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

[OAuth] Handling Concurrent/Parallel Calls and Token Refresh

Hi everyone,

I'm currently developing a Custom Data Connector with the PKCE OAuth2 flow.

We are having some strange issues during a data refresh when an expired access_token is provided.

From Fiddler, we can see that the initial exchange for a new token occurs successfully. But shortly thereafter, multiple calls are made to the /token endpoint using the old refresh_token. It appears that the number of subsequent calls correlates to the number of queries/tables used.

 
PeterPhrak_0-1701728863564.png


Other observations:

  • Navigating to the Connector/Navigator window will correctly refresh the token too if the access_token
  • From the screenshot, you can see a successful call to the endpoint for that single thread.
  • From Power BI Desktop, the user will be presented the SignIn/Credentials window with the error "The credentials provided are invalid" for every query in the refresh (if they selected cancel).
  • The subsequent data refresh will now work as the new tokens have been stored correctly from that first successful exchange.
    • However this is not the case for when the on-premises gateway is used.

I'm wondering if this is a known bug?

Other reference with exact same issue, which seems unresolved.
https://community.fabric.microsoft.com/t5/Developer/Custom-Connector-failing-on-refreshing-data-with... 

Status: Investigating

Hi  @PeterPhrak 

I checked the known issue list,there is no related known issue at the moment.

Power BI known issues - Power BI | Microsoft Learn

 

Based on the above information, if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

The link of Power BI Support: https://powerbi.microsoft.com/en-us/support/

For how to create a support ticket, please refer to https://community.powerbi.com/t5/Community-Blog/How-to-create-a-support-ticket-in-Power-BI/ba-p/6830...

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
PeterPhrak
Frequent Visitor

The following thread also indicates that this is a known bug, but the referenced GitHub issue link is now expired.

https://community.fabric.microsoft.com/t5/Developer/PowerBI-oAuth-Custom-Connector-is-called-multipl... 

v-yetao1-msft
Community Support
Status changed to: Investigating

Hi  @PeterPhrak 

I checked the known issue list,there is no related known issue at the moment.

Power BI known issues - Power BI | Microsoft Learn

 

Based on the above information, if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

The link of Power BI Support: https://powerbi.microsoft.com/en-us/support/

For how to create a support ticket, please refer to https://community.powerbi.com/t5/Community-Blog/How-to-create-a-support-ticket-in-Power-BI/ba-p/6830...

 

Best Regards,
Community Support Team _ Ailsa Tao

PeterPhrak
Frequent Visitor

Thank you @v-yetao1-msft , I have lodged a support ticket as you have recommended.