Share via

How do I connect Azure DocumentDB (with MongoDB compatibility) to Powerbi

Zalim 0 Reputation points
2026-02-24T17:02:00.5766667+00:00

Hi,

I recently created a DB account type: Azure DocumentDB (with MongoDB compatibility). I am curious to how I can connect this account to PowerBi to view data.

I tried to use the current connector selections: Cosmo DB v1, Cosmo DB v2 and Cosmo DB for MongoDB vCore (BETA), however none have worked for me.

Any help on this would be useful.

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.

0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Zalim 0 Reputation points
    2026-03-05T09:35:45.6766667+00:00

    Hi @Manoj Kumar Boyini

    Thank you for your help, I've figured out how to get my db connected to the MongoDB vCore connector. For context to people who may have the same issue as me, it was a combination of ensuring public IP was covered by firewall settings, and also enabling data api (found in the features section). Once data api is enabled a URL is exposed and shown in the connection string section. This is then used as the url to connect to the connector.

    0 comments No comments

  2. Manoj Kumar Boyini 9,410 Reputation points Microsoft External Staff Moderator
    2026-02-26T21:06:01.5766667+00:00

    Hi Zalim

    It sounds like you're trying to connect your Azure DocumentDB (with MongoDB compatibility) to Power BI and running into some issues with the connectors. Here’s what you can do:

    Check Connection Type: As per the documentation, Power BI Desktop currently supports connecting to Azure Cosmos DB using the SQL API or the Gremlin API. If you're using the Table API, this isn't supported, so make sure you're trying the SQL or Gremlin API instead.

    Use the Right Connector: For Azure Cosmos DB with MongoDB compatibility, ensure you’re selecting the "Azure Cosmos DB for MongoDB vCore" option in the Get Data experience within Power BI.

    Connection Steps:

    • Open Power BI and go to Get Data.
      • Choose Azure and then select Azure Cosmos DB for MongoDB vCore.
        • Input your Cosmos DB endpoint. You might need to specify the database and collection, but if omitted, it will show all available collections from the endpoint.
          • Choose either Import or DirectQuery as your connection method.
            • Enter your account credentials if prompted.
            Connection String: Ensure you are using the correct connection string from the Azure portal. You can find this in your Azure Cosmos DB account settings under the "Connection String" section. Firewall Rules: Double-check that your Cosmos DB account’s firewall settings allow connection from your IP or environment. You may need to configure this in the Azure portal. Resources for Further Help:
            - [Visualize Azure Cosmos DB data using the Power BI connector](https://learn.microsoft.com/azure/cosmos-db/powerbi-visualize)
            
               - [Azure Cosmos DB for MongoDB vCore documentation](https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/)
            
                  - [Connect to Azure Cosmos DB for MongoDB vCore from Power Query Desktop](https://learn.microsoft.com/power-query/connectors/azure-cosmos-db-for-mongodb-vcore)
            

    Hope this helps you connect the dots! If you keep experiencing issues, let’s brainstorm some more.

    Follow-Up Questions:

    1. Which specific error message do you receive when trying to connect?
    2. Are you using the Power BI Desktop application or the web version?
    3. Have you ensured that your firewall settings in the Azure portal allow connections from your IP address?
    4. What mode are you trying to set (Import or DirectQuery)?

    Feel free to share more details so we can troubleshoot further!!


  3. SUNOJ KUMAR YELURU 17,981 Reputation points MVP Volunteer Moderator
    2026-02-25T10:08:54.38+00:00

    Hello @Zalim,

    To connect your Azure DocumentDB (with MongoDB compatibility) account to Power BI, you can use the ODBC driver or the Power BI connector. However, it’s important to note that the Power BI connector is primarily supported for Azure Cosmos DB for NoSQL and API for Gremlin accounts, which means it may not work directly with your MongoDB-compatible account. Here are the steps to connect using the ODBC driver:

    1. In Power BI Desktop, select Get Data.
    2. Choose Other > ODBC, and then select Connect.
    3. In the From ODBC window, select the DSN you created for your Azure Cosmos DB and select OK.
    4. In the Navigator window, expand the database and schema, and select the table you want to visualize.
    5. Select the checkbox next to the table name and then select Load to import the data into Power BI.

    If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.


Your answer

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