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.
Hi all,
I searched for a while on the internet, but still couldn't find a solution.
I'm connect to our own REST api to get data into Power BI. The token is given in the URL as follows (example):
https://proxy.companyname.com/report/data?token=[Token here].
Currently this token expires every 10 days, so I replace it after 9 days with a new one. Not the optimal process, but it is good for now until we move to a real data warehouse with cubes. I publish the dashboard and authorize on app.powerbi.com the data source. No problem so far.
After that, I put the auto refresh on 8 times a day (1 hour at least in between). Works fine, until I replace the token. I do this in Advanced Editor and just change the token in url. Refresh works fine, publish gives the new data at app.powerbi.com.
Challenge: After the new token is published the auto refresh stops working. When I check the url I authorize the old token is still in there and not replaced by the new source? How is this possible and how can I solve that also on data source credentials the new data source is really used.
Thanks in advance for helping me on this!
Kind regards
Menno
Hi @MennoTwill,
In fact, power bi rest api contains get token api to get new access token.
I'd like to suggest you add custom steps to invoke 'get token' function and stored token string before main function, then use above token string in your function to work through expired issue.
Reference link:
Regards,
Xiaoxin Sheng
Thank you so much for the reply Xiaoxin.
It is not the REST API token we are using. It is our own server, without any generate token possibility (yet).
I talked with colleagues and they suggested to move the token into a parameter and use that parameter in the advanced editor mode, such that you authorize on url level without the token in it. It works again in Power BI Desktop, but after publish the old token is still there.
To get rid off the data source, I completely removed it and published the dashboard with all errors. After that I added the source again with the parameter, but still the old token is shown on authorization..
HI @MennoTwill,
Can you share some formula sample about invoke api? How did your token generated?
BTW, I also suggest you add a custom function in your service to return avaliabed token string. It will be help to prevent similar expired issue.
Regards,
Xiaoxin Sheng
Anyone any clue what it can be?
To give additional information on this. I also tried to copy the pbix and published under a complete new name. The old token value is still as a data source in app.powerbi.com. I expect it should be something in the file which I'm not aware of.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.