Forum Discussion
Refresh connection to Web API using bearer token
Hi everyone. I am using Power BI Desktop and connecting to a web api that requires a bearer token for authentication. Refreshing the data right now is manual as I have to use Postman to call the token URL, get my token, and paste it into Power BI to refresh the data. The token the expire after an hour and I have to do that all over again. Is there a way I can generate the bearer token inside of Power BI when the refresh button is clicked? Or, can I use Power Automate and the Power BI API to give the report the needed token?
- Anonymous1 year ago
Hi Fosters126 ,
Based on your description, you can try using Power Automate to get the token. set up the trigger process to use the Power BI REST API to trigger the Power Automate process before refreshing the dataset.
Create a Power Automate visual for Power BI - Power BI | Microsoft LearnGet Bearer Token in Power Automate Flow - Carl de Souza
How do I get a Bearer Token for Power BI API? - Microsoft Fabric (fabriconelake.com)
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
1 Reply
- AnonymousNot applicable
Hi Fosters126 ,
Based on your description, you can try using Power Automate to get the token. set up the trigger process to use the Power BI REST API to trigger the Power Automate process before refreshing the dataset.
Create a Power Automate visual for Power BI - Power BI | Microsoft LearnGet Bearer Token in Power Automate Flow - Carl de Souza
How do I get a Bearer Token for Power BI API? - Microsoft Fabric (fabriconelake.com)
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly