How to connect Power BI to Azure CosmosDB for MongoDB vCore?

William Macedo Marcondes 20 Reputation points
2025-03-09T19:21:55.0233333+00:00

I'm trying to connect Power BI to the Azure CosmosDB for MongoDB vCore Free Tier that I provisioned, but the connector asks for an 'Endpoint,' which is not provided in the resource's general panel. Using MongoCompass with the connection string, the connection works correctly.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,902 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Nikolche Karabeleski 5 Reputation points
    2025-04-02T14:54:00.37+00:00

    Hi,

    I same issue here. I have the data in Azure Cosmos DB for MongoDB vCore cluster and I want to get that data into Power BI.

    I read previous conversation from you guys, and I am wondering why we should go with some kind of workaround solution involving other services, but can't just simply use what we have as an option in Power BI, specifically for MongoDB vCore cluster:

    User's image

    User's image

    Why here it is required https:// CosmosDB endpoint, and we all know that one is not available for this type of cluster , connection string that is provided clearly says mongodb+srv:// User's image

    So, if I use this kind of formatted connection string , without the port (port is not allowed in this field read it somewhere), then we are getting this error:
    User's image

    so, on one hand we are forced to use http, https, etc... and on the other hand we can access the MongoDB vCore cluster only from native mongodb driver (pointing out to mongodb+srv:// schema).

    So, either we are making some mistake while provisioning the Azure CosmosDB for MongoDB vCore cluster, or Power BI is still not ready to use this kind of connection?

    1 person found this answer helpful.
    0 comments No comments

  2. David Seale 0 Reputation points
    2025-03-12T12:30:55.3766667+00:00

    Hi @Mallaiah Sangi ,

    The screenshot you shared above is for Azure Cosmos DB. For Azure Cosmos DB MongoDB vcore and RU we are not provided with such keys. See example below. The strings do not begin with https:// which is what Power BI expects.

    CosmosDB


  3. PratikLad 1,825 Reputation points Microsoft External Staff Moderator
    2025-03-20T10:38:18.2933333+00:00

    Hi @William Macedo Marcondes,

    At the moment we can't directly connect the Azure CosmosDB for MongoDB vCore to Power BI.

    Currently, this option is only available for API for NoSQL accounts not for MongoDB API.

    To work around this, you can create T-SQL views directly in Synapse serverless SQL pools and build BI dashboards for Azure Cosmos DB for MongoDB. See "Use Power BI and serverless Synapse SQL pool to analyze Azure Cosmos DB data with Synapse" for more information


  4. TONY TOMY 0 Reputation points Microsoft Employee
    2025-04-15T08:02:41.2266667+00:00

    Hi @Nikolche Karabeleski and @William Macedo Marcondes , you may refer to the article https://learn.microsoft.com/en-us/power-query/connectors/azure-cosmos-db-for-mongodb-vcore for more details about how to connect Power BI to Azure Cosmos DB for MongoDB vCore cluster. Also to answer your question about where to find "Azure Cosmos DB for MongoDB vCore endpoint", you will have to enable the Data API feature in the cluster. Refer to https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/data-api.Please note that this feature is only available for new clusters. User's image

    Copy "Azure Cosmos DB for MongoDB vCore endpoint" from connection string tab once the data API is enabled.

    User's image

    You can use this endpoint for connecting Power Bi to Azure Cosmos DB for MongoDB vCore cluster.

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.