Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ehrom
New Member

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.

1 ACCEPTED SOLUTION
JeremyLi
Employee
Employee

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.😁

View solution in original post

15 REPLIES 15
JeremyLi
Employee
Employee

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.😁

Bonjour  @JeremyLi 

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

Hello,

 

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

 

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

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

emgm2845
Frequent Visitor

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
pjohnson
Frequent Visitor

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

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.

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...

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.

 

PBIConnector_MS_Support.png

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?

yanxind
New Member

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
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).

 

 

v-piga-msft
Resident Rockstar
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

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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):
CosmosCollectionForbidden.png

 

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.

 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.