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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.