Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Dashboard won't refresh when programmatically calling from an API with Basic Auth

Good morning all, I have an issue where I've created a dashboard from an API using a bearer token in M/Power Query - I've used Power Automate to refresh the report every 2 minutes and everythnig was working well.


I then added another query, this time calling from a different API using Basic Auth (again in M/Power Query).


It was refreshing just fine in the Desktop app. However, in the service it just gets stuck when trying to refresh and stays on the spinning circle indefinitely. I can stop it by republishing the report but then the next refresh kicks in and the cycle starts again.


I checked Power Automate and that was saying my Flow was triggering successfully.


I then removed the second API query using Basic Auth as that's when the problem started, and the dashboard started refreshing in the service again.


I then tried creating a new simple dashboard using only the API requiring Basic Auth, and again, it refreshes in the Desktop app, just not in the service.


This time though, the refresh fails and I can see the below error:



I don't understand why I'd get this though as I passed through my base64 encoded credentials in Power Query and then connected anonymously, therefore it should work, right?


When I check the Data Source Credentials, it says it's connected using Basic and shows my username and hashed password, so when I try and change it to Anonymous, I get this error:




I then created another report, this time connecting to the API using the Power BI UI and it refreshes fine in the Service.


Is it not possible to authorise Basic Auth programmatically and then have it refresh in the service? 

Super User III
Super User III
Super User III
Super User III

Most likely not.  Have you considered using streaming datasets instead?  They allow you to push rows based on simple auth keys.

Hi Ibendlin, thanks for your response. I'd considered it to the extent I watched a YouTube video before deciding it looks very complicated!


I should revisit it though, so if you know of any good guides/tutorials, I'd be keen to read them?

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.