Forum Discussion

Ehrom's avatar
Ehrom
New Member
7 years ago
Solved

Cosmos DB connection issuee

I am trying to connect to a Comos DB (Mongo API) account from Power BI, using the Azure Comos DB (Beta) connector. I can browse the database and list the collections, but when I try to browse a collection, the following error is encountered: "Expression.Error: Access to the resource is forbidden.".

 

I followed this tutorial: https://docs.microsoft.com/en-us/azure/cosmos-db/powerbi-visualize

 

In previous reports I achieved the connection to the Cosmos DB account and database.

 

I am using the June 2019 version of Power BI Desktop.

  • Anonymous's avatar
    Anonymous
    5 years ago

    Please be kindly noted that the Power BI connector is currently ONLY supported for Azure Cosmos DB SQL API and Gremlin API accounts as per Cosmos DB official doc: Visualize Azure Cosmos DB data by using the Power BI connector


    For MongoDB API, it CANNOT be connected with Power BI connecter at this moment.
    The API check CAN‘T be removed even by creating support ticket. That API check has been coded to disable the interoperability between SQL API and MongoDB API to prevent many known issues mixing up two different APIs.

     

    No execption can be made for now.
    Encourage you to feedback and vote at PowerBI Ideas and Cosmos DB API for MongoDB User Feedback so the product managers can check and consider to add it.  

     

    We VALUE your voice as always!!!Thanks.😁

15 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Please be kindly noted that the Power BI connector is currently ONLY supported for Azure Cosmos DB SQL API and Gremlin API accounts as per Cosmos DB official doc: Visualize Azure Cosmos DB data by using the Power BI connector


    For MongoDB API, it CANNOT be connected with Power BI connecter at this moment.
    The API check CAN‘T be removed even by creating support ticket. That API check has been coded to disable the interoperability between SQL API and MongoDB API to prevent many known issues mixing up two different APIs.

     

    No execption can be made for now.
    Encourage you to feedback and vote at PowerBI Ideas and Cosmos DB API for MongoDB User Feedback so the product managers can check and consider to add it.  

     

    We VALUE your voice as always!!!Thanks.😁

    • Huguo90's avatar
      Huguo90
      Helper I

      Hello,

       

      I'm facing the same problem it's been two years, hasn't @Microsoft solved this problem yet?

       

    • Huguo90's avatar
      Huguo90
      Helper I

      Bonjour  Anonymous 

      Je suis confronté au même problème que cela fait deux ans, n’a-t-@Microsoft pas encore résolu ce problème?

  • Anonymous's avatar
    Anonymous
    Not applicable

    For the record, here is how we fixed the issue:

     

    In Power BI, use the Cosmos DB connector and change your url from https://*.mongo.cosmos.azure.com to https://*.documents.azure.com. This is the URL of the internal CosmosDB without the MongoDB interface on top of it.

     

    Now if you try this, you will get a connection error / authentication error. This is because there is a backend check that makes sure that if you are using on MongoDB API you only connect the the Mongo URL and not direct to the CosmosDB. This API check can be removed by the Microsoft support team. You need to open up a support ticket to get that check removed. After that happened you are able to connect to the underlying CosmosDB data.

     

    It takes some time in Power Query to get anything usefuly out of the internal representation of the data, but hey, at least it works.

     

    Cheers

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for the information, while there are some changes now, please kindly refer to the answer below provided by Jeremy.😀

  • Anonymous's avatar
    Anonymous
    Not applicable

    yanxind , Anonymous :

    After contacting MS Support, it seems that MongoDB API configuration for CostmosDB is not currently supported as a PowerBI connector. However, SQL API and Gremlin API configurations are supported.

     

    • rcyber's avatar
      rcyber
      Resolver I

      I have got the same issue.

      It will be good if MS team answers anything here.

      We were working, we have a plans, we advertised very beautiful charts to our customers.

      And... What should we do now?

  • pjohnson's avatar
    pjohnson
    Frequent Visitor

    Has anyone heard an update on this issue? We think we are seeing the same issue.

    • rcyber's avatar
      rcyber
      Resolver I

      Hi pjohnson ,

       

      We have contacted MS and they answered this opprtunity was working accidentaly.

      Finally, we resolved our problem by the following way.

      We have set up daily export the Cosmos database into blob storage on Azure.

      Then we could get a data from it via Power BI.

      I hope it helps you.

      • pjohnson's avatar
        pjohnson
        Frequent Visitor

        Thanks for that idea! I was able to export the data out to azure storage and work with it from there.

         

        Still would be nice if the native connector inside of Power BI actually worked though...

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Ehrom ,

    Please check if you have install the latest version of power bi desktop 2.70.5494.761 firstly.

    In addition, please clear the permission for the azure cosmos db under data source settings and connect again.

    Best Regards,

    Cherry

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      EEH & v-piga-msft,

      I have the latest PowerBI Version: 2.71.5523.941 64-bit (July 2019).

      I have been having this issue recently too (see below):

       

      I followed the tutorial as well with the appropriate URI and Primary Key for authentication. Getting the error on step 10.

       

      Any guidance would be appreciated.

       

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Yes, I am having the same problem!

     

    Strange thing is that any Cosmos DB created before June or so does NOT have this problem, I can connect and read data just fine.  Any recently created Cosmos DB however incurs this problem.

     

    Is there some sort of update to the Cosmos DB connector?  This happens with version 2.72.5556.801 (August 2019).

     

     

  • I am using PowerBI Desktop version 2.73.5586.661 64Bit(Sept 2019),  have the same issue when connect CosmosDB data.

    Anybody can help?

     

    Thanks

     

  • Anonymous's avatar
    Anonymous
    Not applicable
    Tengo el mismo problema, no puedo a Azure cosmos dB desde power bi, estoy utilizando la última version. Según lo que entiendo es que ahora para conectar estos dos servicios se debe realizar mediante conexión ssl.

    Ya probé limpiando las conexiones y tampoco me ha funcionado.

    He visto que se podría resolver el problema utilizando api cosmos, gremlin api o por almacenamiento de bloques. Me podrían regalar un ejemplo o indícame cómo podría realizar esto. De antemano gracias