Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I've created a REST query that uses a bearer token, which it gets from a function I've created:
Function:
Query:
It refreshed fine for a while but then, after a certain amount of time, the refresh stops working and I get a 'can't authenticate using these credentials' message.
If I invoke my function it produces a new access token, so it can't be that. What I did was, go to my data source settings for the two queries, clear their permissions and then refresh again, ignoring privacy rules and they start refreshing again, without issue...
I can even clear permissions and set them to public and they refresh fine aswell!
With either solution, after a certain amount of time they stop working again and I have to repeat this exercise, clearing data source permisions and then refreshing them again, which is not helpful for the end client.
I created an Azure Datafactory pipeline, doing the same thing as Power BI and it worked for 3 days straight, refreshing every 15mins without issue, exporting to a JSON that I could import into Power BI. I also can replicate the REST API in Postman without any issues, leading me to believe the issue lies in Power BI somewhere.
Has anyone come accross this or have any dieas what is going on?
@ImkeF you've helped me before, any thoughts?
Update:
It appears to be the GetAccessToken() function that is causing the issue.
Essentially, if I stop it being a function, clear its permissions and then run it, setting the permissions on run time, it then returns a string happily. I then set it back to a function and then I can run everything else fine...weird!?
Any thoughts @ImkeF?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |