# CosmosDB connectivity - Anyone succeeded?

**URL:** <https://community.dremio.com/t/cosmosdb-connectivity-anyone-succeeded/8440>\
**Category:** Uncategorized\
**Created:** [December 2, 2021, 12:27pm UTC](https://community.dremio.com/t/cosmosdb-connectivity-anyone-succeeded/8440 "2021-12-02T12:27:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spireite](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@spireite](https://community.dremio.com/u/spireite)\
**Post date:** [December 2, 2021, 12:27pm UTC](https://community.dremio.com/t/cosmosdb-connectivity-anyone-succeeded/8440/1 "2021-12-02T12:27:40Z")

</div>

As Cosmos is MongoDB compatible, you can connect to it with a MongoDB client., with caveats.

The Dremio MongoDB source driver doesn’t actually have any flexibility to enable a connection.

What would be good would be one of the following in order of preference…

1. Provide a native CosmosDB connector

or

1. Allow a MongoDB connection string to be pasted in as an alternative to form field entries for the different sections.

For example, the following connection string should be enough , assuming Cosmos instance is called [mydremiotestdb.documents.azure.com](http://mydremiotestdb.documents.azure.com), where \*\*\*\* is the access key

Arguably, you hould just be able to paste in a mongo connection string anyway as an option.

* * *

mongodb://mydremiotestdb:\*\*\*\*\*\*@mydremiotestdb.documents.azure.com:10255/mydatabase?ssl=true

Any update on the status?

---

<div class="post-metadata">

**Author:** ![spireite](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@spireite](https://community.dremio.com/u/spireite)\
**Post date:** [December 2, 2021, 7:36pm UTC](https://community.dremio.com/t/cosmosdb-connectivity-anyone-succeeded/8440/2 "2021-12-02T19:36:46Z")

</div>

Further update…

If Cosmos is deployed with Mongo API active, it would _seem_ I can configure a connection of sorts… it would appear to validate the connection , but Dremio throws back a ‘no collections visible’ on trying to save the connection.

If anyone has a pointer/workaround , I’d appreciate. This seems close!

---

<div class="post-metadata">

**Author:** ![spireite](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@spireite](https://community.dremio.com/u/spireite)\
**Post date:** [December 3, 2021, 9:39am UTC](https://community.dremio.com/t/cosmosdb-connectivity-anyone-succeeded/8440/3 "2021-12-03T09:39:16Z")

</div>

Another update…

Looking in the server.log, it does appear that Cosmos is being connected ok

The log looks like…

2021-12-03 09:30:50,204 [start-cosmos] INFO c.d.p.m.c.MongoConnectionManager - Created connection to [[address:10255=xx.mongo.cosmos.azure.com](http://address:10255=xx.mongo.cosmos.azure.com), user=yy].

2021-12-03 09:30:50,204 [start-cosmos] INFO c.d.p.m.c.MongoConnectionManager - Number of open connections 1.

2021-12-03 09:30:50,204 [start-cosmos] INFO c.d.p.m.c.MongoConnectionManager - MongoCredential:MongoCredential{mechanism=null, userName=‘yy’, source=‘xx’, password=, mechanismProperties=}  
2021-12-03 09:30:50,490 [start-cosmos] ERROR c.d.p.mongo.MongoDocumentHelper - Failed to run command `Document{{usersInfo=Document{{user=yy, db=xx}}, showCredentials=false, showPrivileges=true}}`, exception : com.mongodb.MongoCommandException: Command failed with error 115 (CommandNotSupported): ‘Command usersInfo not supported.’ on server [xx.mongo.cosmos.azure.com:10255](http://xx.mongo.cosmos.azure.com:10255). The full response is {“ok”: 0.0, “errmsg”: “Command usersInfo not supported.”, “code”: 115, “codeName”: “CommandNotSupported”}
