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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
clongaw
Frequent Visitor

Refresh Function not run when Access Token expires in Power BI Custom Connector OAuth flow

I have a Custom Connector that is working well. It pulls data, handles pagination, and handles the Access Token expiring after 15 minutes during large calls. However, I have an issue specifically with Power BI Online and using Data Gateways. When I refresh in Power BI Desktop, I can make large calls and rely on the pagination and refresh of the Access Token after 15 minutes. However, Power BI Online behaves differently. Power BI Online will start by Refreshing the tokens (as expected), then it will grab data and paginate for 15 minutes (all as expected). After 15 minutes, it hits 401 Unauthorized errors as the Access Token has expired (once again, still working as designed). Where Power BI Desktop is smart enough to just run the Refresh function and continue where it left off, I can see that Power BI Online never attempts to run the Refresh function. Instead, it just fails the query and returns the Invalid User Credential error.

 

Has anyone ran into this issue before? All testing, debugging, and even live environment using Power BI Desktop work fine along with any queries using Power BI Online that happen to be under the 15 minute expiration time. It's only the detection and use of the Refresh function in the middle of queries that is having an issue. I have found this issue is for both the Personal Data Gateway and the Enterprise Data Gateway.

1 ACCEPTED SOLUTION
1 REPLY 1

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.