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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jwillis07
Helper I
Helper I

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:

 

jwillis07_0-1627030320813.png

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:

 

jwillis07_1-1627030507282.png

 

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? 

3 REPLIES 3
lbendlin
Super User
Super User
lbendlin
Super User
Super User

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

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors