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.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.