MongoDB Connector

Hi there,

How do I specify the database to connect to in the mongoDB connector node?

The user ID I need to use, does not have admin rights on the mongodb, and as the connector appears to issue an automated db.list() command to generate a list of available databases, this fails with an Error13: Insufficient privileges’ to list the available DB

ERROR MongoDB Connector 4:207 Execute failed: Command failed with error 13 (Unauthorized): ‘not authorized on admin to execute command { listDatabases: 1, $db: “admin”, lsid: { id: UUID("xxxxxx) } }’ on server xxxxxxx:xxxxx. The full response is {“ok”: 0.0, “errmsg”: “not authorized on admin to execute command { listDatabases: 1, $db: "admin", lsid: { id: UUID(\xxxxxxxxxxx”) } }", “code”: 13, “codeName”: “Unauthorized”}

How can I get around this ?
Thanks in advance for your help,

Stanage

Hi @stanage , this behaviour seems to be a common issue with MongoDB:
https://jira.mongodb.org/browse/VSCODE-157

I’m not sure what’s the work around for this…