Forum Discussion
NTolani
8 months agoNew Member
undefined
Trying to establish connection from power bi to mongo cosmos azure db. I have below inputs Host: accountname.mongo.cosmos.azure.com Account name: accountname Key: Key We are using power bi gatewa...
deborshi_nag
7 months agoSuper User
Hello NTolani
Power BI Desktop does not support direct connectivity to Azure Cosmos DB (Mongo API) via the on-premises gateway in the same way the Power BI Service does.
Why the Gateway Connections Don’t Show in Desktop
- The gateway is designed for Power BI Service to access on-premises or hybrid data sources.
- Power BI Desktop cannot consume gateway connections directly; it needs a connector or a direct connection string.
Use the following workarounds -
1. Use the Native Azure Cosmos DB Connector
- Power BI Desktop has a built-in Azure Cosmos DB connector, but it works with the SQL API, not Mongo API.
- If your Cosmos DB is using the Mongo API, this connector won’t work.
2. Use the MongoDB Connector
- Power BI Desktop supports MongoDB via the ODBC driver or BI Connector.
- Steps:
- Install a MongoDB BI Connector or ODBC driver on your machine.
- Configure the connection string using:
mongodb://<accountname>.mongo.cosmos.azure.com:10255/?ssl=true&replicaSet=globaldb&authSource=admin
- Use your account name and key as credentials.
- In Power BI Desktop, go to Get Data > ODBC or Get Data > MongoDB (if available).
- Authenticate using username = accountname, password = Key.
3. Use an Intermediate Layer
- If direct Mongo connectivity is problematic, you can:
- Create an Azure Function or Data Factory pipeline to pull data from Cosmos DB and store it in:
- Azure SQL Database
- Azure Data Lake
- Then connect Power BI Desktop to that source.
- Create an Azure Function or Data Factory pipeline to pull data from Cosmos DB and store it in:
Hope this helps - please appreciate by leaving a Kudos or accepting as a Solution to help others!
trillionaires
5 months agoNew Member
Power BI Desktop cannot use gateway connections directly for Azure Cosmos DB (Mongo API). To connect:
MongoDB Connector / ODBC – Install the Mongo BI Connector or ODBC driver, then connect using your account name as username and key as password.
Intermediate Layer – Pull data via Azure Data Factory or Azure Function into Azure SQL Database or Data Lake, then connect Power BI Desktop to that source.