Skip to content

Commit 0fc3f9d

Browse files
committed
doc updates
1 parent 6b26f5a commit 0fc3f9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

articles/cosmos-db/mongodb/how-to-setup-rbac.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ MongoClient client = new MongoClient(uri);
129129
mongosh --authenticationDatabase <YOUR_DB> --authenticationMechanism SCRAM-SHA-256 "mongodb://<YOUR_USERNAME>:<YOUR_PASSWORD>@<YOUR_HOST>:10255/?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000"
130130
```
131131

132+
## Authenticate using MongoDB Compass or Azure Data Studio
133+
```bash
134+
connectionString = "mongodb://" + "<YOUR_USER>" + ":" + "<YOUR_PASSWORD>" + "@" + "<YOUR_HOSTNAME>" + ":10255/" + "<YOUR_DATABASE>" +"?ssl=true&retrywrites=false&replicaSet=globaldb&authmechanism=SCRAM-SHA-256&appname=@" + "<YOUR appName FROM CONNECTION STRING IN AZURE PORTAL>" + "@"
135+
+"&authSource=" +"<YOUR_DATABASE>";
136+
```
137+
132138
## Azure CLI RBAC Commands
133139
The RBAC management commands will only work with newer versions of the Azure CLI installed. See the Quickstart above on how to get started.
134140

0 commit comments

Comments
 (0)