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
jarkelen
New Member

Refresh API data of published report fails due to credentials

Hi,

I have created a report which uses a web API as data source. It authenticates by retrieving and sending a Bearer token, this is done in Power Query as one of the first steps and it works fine. The data source settings in PowerBI Desktop are set to anonymous and public, because authentication is handled as one of the steps. This works fine.

jarkelen_0-1677136687578.png

However, after publishing it doesn't update the report anymore. I have enabled automatic refresh, but these fail:

 

The credentials provided for the Web source are invalid.

 

If I look at the options these are the same as in Desktop. Any idea how to solve this?

jarkelen_1-1677136781980.png

Regards,

John

2 REPLIES 2
ibarrau
Super User
Super User

Hi. Please make sure you know the development and you are sure it is anonymous because you are getting the token inside. Sometimes people think it's anonymous because it works on desktop on the local environment but it's not because it wouldn't work on other machine or at the web.

I had issues with anonymous API requests when you authenticate with headers and I was 100% sure that the request was at cloud and was anonymous because the code was solving it. So I have skipped the test when editing credentials and run the refresh. It worked. Sometimes the button for testing connection can't solve this weird situations of anonymous with internal credentials.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

I also develop the API, so I have full control on it. So the request itself is anonymous, but you need an Authorization header with Bearer token, which is handled fine.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors