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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
KoenVdB
Advocate I
Advocate I

Cosmos DB - Mongo db api > Access to the resource is forbidden

We have created a cosmos db using the mongodb api. 

Feeding the db is not an issue, but we want to visualize the data in power bi.

We can navigate to the collection with the db but after that we always receive the message: "Access to the resource is forbidden"

cosmosError.png

As Account key for connecting we used the "primary key" from the Read-only keys and also did a try with the read-write primary key but always we receive this error.

 

Can somebody help us?

thanks in advance

7 REPLIES 7
sidkasat
Employee
Employee

I had seen this issue recently with the cosmosdb Mongo API version 3.6 we were using. I think it has something to do with the URL for the db as that is different than a 3.2 version cosmosdb. Had opened a ticket against cosmosdb team so hopefully we have a solution soon

Anonymous
Not applicable

I am trying to achieve the same thing, connting from PBI to Cosmos (MongoDB 3.6). Am getting the same Access-to-the-resource-is-forbidden error.

 

What I find confusing is that I have an old project where I did the same thing and it worked (and still works). Only difference is that the server version is 3.2. How is this possible?

 

How can 2 core MS products not be integrated with each other? That is very dissappointing. Is there any solution to this? Is this issue on the roadmap?

Tuve el mismo problema, al parecer mongo utiliza una conexión segura y power bi no tiene ese tipo de conexión. Para solucionar el problema al momento de crear la base de datos en cosmos no utilize mongo si no que utilize sql api core. 

 

v-lid-msft
Community Support
Community Support

Hi @KoenVdB ,


How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lid-msft 

 

we have swiched to cosmosdb and SQL API. Power Bi is able to connect to that one by default.

 

Tengo el mismo problema, me podrias indicar un ejemplo de como realizar la conexion entre cosmos db y power bi desktop

v-lid-msft
Community Support
Community Support

Hi @KoenVdB ,

 

How about connecting in the blank query ? please refer to the following thread: https://community.powerbi.com/t5/Desktop/Using-a-REST-API-as-a-data-source-POST-Method-Only/td-p/244...

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.