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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
anon97242
Advocate II
Advocate II

Error with query in DataflowGen2 : ErrorCode : TokenExpired

Attempting to access a DataflowGen2 and running into these errors whenever I am attempting to reference a table a Lakehouse/workspace directly, i.e. 

 Source = Lakehouse.Contents(null){[workspaceId = "03a21abc-1234-4510-ae38-XXXXXXXX123"]}[Data]{[lakehouseId = "9cad20d2-d4cd-1234-818b-XXXXXXXX123"]}[Data],



Downstream service call to url 'https://api.powerbi.com/metadata/cluster' failed with status code 403. ErrorCode : TokenExpired

Details
Reason = DataSource.Error
ErrorCode = Lakehouse035
Error = [code=TokenExpired,message=Access token has expired, resubmit with a new access token]
ErrorCode = TokenExpired
RequestId = 23126f5c-3295-4c2e-9c7a-2ed6f3a102c9
ErrorMessage = Access token has expired, resubmit with a new access token
1 ACCEPTED SOLUTION
anon97242
Advocate II
Advocate II

Just an update, the issue here was in the connection to the On-Premises gateway.

Connections to the gateway had to be refreshed, and then I needed to "re sign in" by clicking the Manage Connections Icon within the DataflowGen2 editor, clicking on the connection prompts you to re-sign in.manageConnectionsIcon.png

View solution in original post

3 REPLIES 3
anon97242
Advocate II
Advocate II

Just an update, the issue here was in the connection to the On-Premises gateway.

Connections to the gateway had to be refreshed, and then I needed to "re sign in" by clicking the Manage Connections Icon within the DataflowGen2 editor, clicking on the connection prompts you to re-sign in.manageConnectionsIcon.png

anon97242
Advocate II
Advocate II

Hello!

Thank you kindly for your prompt response. Unfortunatley, this still seems to be an issue. I've logged out and logged back in, and am able to refresh table in the UI in the source workspace. The issue comes when accessing via another workspace.

Even builiding a new DataflowGen2 where we connect to the existing workspace/lakehouse, the error is the same.

We use an on-premises gateway for the connection. So it seems like maybe that is the root cause here. Is there a possibility to refresh connections in the gateway? Or is there some further information we can pass along to our networking team?

Thanks for your assistance!
 

v-tsaipranay
Community Support
Community Support

Hi @anon97242 ,

Thank you for reaching out to the Microsoft fabric community forum.


The error message you’re encountering TokenExpired during access to a Lakehouse from Dataflow Gen2 indicates that the authentication token used for the request has expired.

This typically happens if the session is left idle for an extended period or if the token is not refreshed properly during query execution.

To resolve this, please sign out and sign back into the Microsoft Fabric portal to renew your session, then reopen the Dataflow and revalidate or rebuild the Lakehouse query. This ensures a fresh access token is used. Additionally, avoid prolonged inactivity in the Dataflow editor, as this can cause token timeouts. Please also verify that you have the necessary permissions (at least Build) on both the Lakehouse and the workspace.

 

I hope this will resolve your issue, if you need any further assistance, feel free to reach out.

If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

 

Thankyou.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.