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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
crocus1
Frequent Visitor

Web API Token refresh problem

I have a web api that uses a token. To get it to work the token can only be 10 minutes old. 

Manual steps to refresh:

1. refresh token query

2. refresh Web API query that uses the token

 

I moved this to dataflows and it fails when all the querys are in one dataflow. I tried to move the token to a new dataflow and refresh that first. However I can only choose to put it a half hour before. If I schedule it a half hour after the token is made it fails because the token is too old.

 

Problem with service.png

 

It also fails if I put them both at the same time. 

Basically I need to delay the Web API query 30 seconds until the token is ready.

Any ideas?

1 ACCEPTED SOLUTION
nickyvv
Most Valuable Professional
Most Valuable Professional

Not sure if this would work with your specific API, but Parker has a nice video explaining refreshing/getting a token with a Power Query function:
https://www.youtube.com/watch?v=2RZkc_qrV1g


Did I answer your question? Mark my post as a solution!

Blog: nickyvv.com | @NickyvV


View solution in original post

2 REPLIES 2
nickyvv
Most Valuable Professional
Most Valuable Professional

Not sure if this would work with your specific API, but Parker has a nice video explaining refreshing/getting a token with a Power Query function:
https://www.youtube.com/watch?v=2RZkc_qrV1g


Did I answer your question? Mark my post as a solution!

Blog: nickyvv.com | @NickyvV


Putting my token call in a function allowed the dataflow refresh to happen.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.