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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sidarth1989
Frequent Visitor

Your data source can't be refreshed because the credentials are invalid.

I know there are few questions asked in the community specifying the same issue and I have gone through all of them but they don't apply to my scenario.

 

I have an api on my azure cloud with AAD authentication and I am using this api as data source via web connector in Power BI desktop. On Power BI desktop I am able to dynamically generate token through power query code, connect to the web api(anonymous access) and create a report from it. Refresh is also happening perfectly. 

 

However when I published my report on to Power BI service and tried to refresh there I get the following error

sidarth1989_1-1599544053732.png

 

On further investigation I went to settings and found this 

sidarth1989_2-1599546625315.png

It shows me Anonymous and Basic access method on the Power BI service for credentials

 

Any idea how to get past this?

 

My power query code is :

sidarth1989_3-1599547145645.png

 

 

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@sidarth1989 - If your Power Query code is doing the authentication then can you choose Anonymous?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  I am connected via Anonymous access on Power Bi desktop

@sidarth1989 - But it doesn't like Anonymous in the Service? Is that the issue?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  I think so. And I am not sure how to get around this issue

amitchandak
Super User
Super User

@sidarth1989 , while setting up Scheduler you have an option for the gateway ? Have you tried that?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  I did not try data gateway because my data source is in the cloud.  But the option for gateway is greyed out for me

 

sidarth1989_0-1599558103230.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors