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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
PeterPhrak
Frequent Visitor

Custom Connector: Data Refresh Issue with Expired Access Token (Multiple Calls to /Token Endpoint)

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-1701332950998.png


Other observations:

 

  • Similarly, 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?

Our auth implementation is quite close to the sample: https://github.com/microsoft/DataConnectors/tree/master/samples/OAuthPKCE

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

2 REPLIES 2
lbendlin
Super User
Super User

If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

Thank you that advice, Ibendlin. I've raised an issue with the link you have provided.

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors