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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.