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
akodali
Frequent Visitor

Assistance Needed: Data Source Error in Semantic Model due to Expired Refresh Token

I'm encountering a data source error with the following message:

Data source error: {"error": {"code": "AdalRefreshTokenExpiredErrorCode", "pbi. error":{"code": "AdalRefreshTokenExpiredErrorCode", "parameters":{}, "details":[{"code": "AdalErrorMessage", "detail": {"type": :1, "value":[value]: The refresh token has expired due to inactivity. The token was issued on [date] and was inactive for 90.00:00:00."}], "exceptionCulprit":1}}} Table: calendardate.

Could you please help me understand why this error occurs and how to resolve it?

1 ACCEPTED SOLUTION

Thank you for the reply. I noticed that one of the Integration Runtimes in our pipeline was outdated. After updating it to the new version, the issue was resolved.

View solution in original post

13 REPLIES 13
v-pnaroju-msft
Community Support
Community Support

Hi akodali,

Thank you for the update.

Since the semantic model uses only native Lakehouse tables, the problem might be caused by hidden token-based metadata added by the pipeline, especially if it uses linked services with OAuth2. Sometimes, workspace permission issues or outdated model metadata can also cause the AdalRefreshTokenExpiredErrorCode.

Please follow these steps which may help fix the issue:

  1. Create a new Lakehouse and use the Copy Data activity in the pipeline instead of shortcuts or linked sources. Then build a new semantic model from this new Lakehouse to avoid any inherited metadata.
  2. Check the Linked Services in the pipeline by going to Data Factory > Manage > Linked Services. Re-login or re-authenticate any external connections. It is better to use managed identity to prevent token expiration.
  3. Verify Ownership and Permissions. Make sure the owners of the semantic model and pipeline still have valid access to the workspace. If needed, recreate the model with a current workspace admin.

If this response helps you, please mark it as the accepted solution. This will help other community members who have similar questions.

If you need any more help, feel free to ask in the Microsoft Fabric community.

Thank you.

Thank you for the reply. I noticed that one of the Integration Runtimes in our pipeline was outdated. After updating it to the new version, the issue was resolved.

Hi @akodali,

We are pleased to learn that the issue has been resolved. Thank you for sharing your insights and approach in addressing the matter.

We kindly request you to mark your response as the accepted solution, as this will assist other community members in locating answers to similar challenges more efficiently.

Please continue to utilise the Fabric Community for any further assistance with your queries.

Thank you.

Sure, will do. 
Thank you for your assistance once again!

v-pnaroju-msft
Community Support
Community Support

Hi akodali,

We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.

If you find the response helpful, please mark it as the accepted solution, as this will help other members with similar queries.

Thank you.

Thank you for the reply. I unfortunately do not find any shortcuts in the Lakehouse and couldn't resolve that error yet.

v-pnaroju-msft
Community Support
Community Support

Hi akodali,

Thank you for the update.

Even though the semantic model uses only Lakehouse tables, the problem can happen if the pipeline feeding your Lakehouse has shortcuts or external connections (like Azure SQL or Blob Storage). These can create hidden dependencies that still need OAuth2 tokens, which cause the AdalRefreshTokenExpiredErrorCode error.

Please follow these steps which might help fix the issue:

  1. Go to the Lakehouse in the Data Engineering view. Check if any tables have a shortcut or link icon. If yes, replace them by using a Copy data activity to create fully ingested native tables.
  2. Make sure the pipeline uses Copy to load data into the Lakehouse. Avoid using shortcuts or reading directly from external sources.
  3. After updating the Lakehouse structure, create a new semantic model that uses only native tables.

If you find this response helpful, please mark it as the accepted solution. This will help other community members who have similar questions.
If you have any more questions, feel free to contact the Microsoft Fabric community.

Thank you.

Thank you for the reply. I unfortunately do not find any shortcuts in the Lakehouse. 

v-pnaroju-msft
Community Support
Community Support

Hi akodali,

Thank you for your follow-up.

As I understand, since the dataset is created directly from a Lakehouse, the data source credentials are greyed out on purpose. This happens because Lakehouse in Microsoft Fabric uses internal OneLake storage, and the Fabric service automatically handles authentication using the workspace context. So, you don’t need to enter credentials manually, and it is not allowed.

But if you are still getting the AdalRefreshTokenExpiredErrorCode, it probably means your semantic model is using an external data source like Azure SQL, SharePoint, or a shortcut inside the Lakehouse that points to such an external source.

Please follow these steps to fix the issue:

  1. Check your semantic model for any external data sources or shortcuts that refer to places outside your current workspace or tenant.
  2. If external sources are used, go to the original source (like a Dataflow, Pipeline, or shortcut) and re-login or re-authenticate the connection.
  3. If you are only using Lakehouse native tables, try creating the semantic model again to clear any old metadata.

If you find this answer helpful, please mark it as the accepted solution. This will help other members in the community who have the same questions.

If you have any more questions, please feel free to ask in the Microsoft Fabric community.

Thank you.

Thank you for your reply. The semantic model I'm using sources its data exclusively from the two tables in the lakehouse. The lakehouse, in turn, receives data from external sources through a pipeline that refreshes automatically every few hours without any errors. Despite trying to create a new semantic model, I continue to encounter the 'AdalRefreshTokenExpiredErrorCode' error for that newly created semantic model.

v-pnaroju-msft
Community Support
Community Support

Thankyou, @lbendlin, for your response.

Hi akodali,

We appreciate your inquiry through the Microsoft Fabric Community Forum.

Based on my understanding, the error "AdalRefreshTokenExpiredErrorCode – The refresh token has expired due to inactivity" occurs because the OAuth2 token used to connect the data source has been inactive for over 90 days. Azure Active Directory (AAD) automatically expires tokens after 90 days of inactivity, which leads to scheduled refresh failures in Power BI or Microsoft Fabric.

To resolve this issue, you need to re-authenticate the data source credentials. Kindly follow the steps given below:

  1. Go to Power BI Service or Microsoft Fabric.
  2. Navigate to your Workspace and select the affected Semantic Model.
  3. Click the ellipsis (…) and choose Settings.
  4. Under Data Source Credentials, click "Edit credentials."
  5. Sign in using the appropriate authentication method (for example, OAuth2 or organizational account).
  6. Save the changes and manually refresh the dataset to confirm that the issue has been resolved.

We recommend setting up a monthly refresh schedule or ensuring periodic sign-ins to keep the tokens active.

Additionally, please refer to the following link for more information:
Refresh tokens in the Microsoft identity platform - Microsoft identity platform | Microsoft Learn

If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar issues.

Should you have any further queries, please feel free to contact the Microsoft Fabric community.

Thank you.

Thank you for your response. It appears the data source credentials are greyed out, possibly because the dataset originates directly from the lakehouse.

lbendlin
Super User
Super User

Refresh your token within the 90 day period.

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

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

July 2025 community update carousel

Fabric Community Update - July 2025

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