Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

API with dynamic access token can't refresh in Power BI service


I have a report needs to get data from a REST API. To access the API, I need to first generate a access token and the token will be expired every 1 hour. I've searched many materials and was able to write a power query in Power BI desktop to generate the dynamic token and then refresh the dataset. However, after publishing the report to Power BI service, it won't allow me to refresh the dataset by schedule. Some of the posts say that we need to build a custom connector to make it work in Power BI service. 

Does anyone has idea is there some other way to make it work?



Regular Visitor

Did you find a solution?

If you have Power BI Premium license, we will be able to do the schedule refresh without issues.

Regular Visitor

Hi All.. I also have the same problem. Does any one know how to fix this?

Community Support
Community Support

Hi @emilyh ,

Please refer to the following documents to see if it helps you.


If it does not solve your problem, please provide a screenshot on it.


Best Regards

Community Support Team _ Polly


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-rongtiep-msft ,

I tried the solution you provided from the links, but did not work for my scenario. I need to access to a API with a dynamic access token which need to be refreshed every one hour. The access token is part of the header.

if I put the authorization part in a query, the authentication did not work.


it works using header, but it won't allow me to refresh in Power Bi service using this way.



@emilyh , Where you able to find a solution for this, even I do have the same problem.

Did any of you solve the problem? Facing the same.

Hi @v-rongtiep-msft 

I have the same problem. Is there any solution for that?



Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors