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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.