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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
koralka
Helper I
Helper I

Resfesh Issues (DMTS_OAuthTokenRefreshFailedError)

Hello,

I regularly receive the following error in one of our Power BI models that is connected to Databricks:

Data source error: {"error":{"code":"DMTS_OAuthTokenRefreshFailedError","pbi.error":{"code":"DMTS_OAuthTokenRefreshFailedError","details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"[DataSource.Error] Web.Contents failed to get contents from [cluster name here] (400): Bad Request"}}],"exceptionCulprit":1}}

The engineer supporting the environment has advised that everything appears to be working correctly, and that the only occasional issues relate to column errors.

However, the issue persists and occurs almost daily. Manually selecting “Edit Credentials” in the dataset settings temporarily resolves the refresh issue, but only until the next occurrence.

Would anyone have any ideas on what could be causing this, or what areas would be worth investigating further?

Thank you.

 

6 REPLIES 6
Lodha_Jaydeep
Solution Supplier
Solution Supplier

Hi @koralka,

Thanks for reaching fabric community, will happy to assist.

This looks related to the stored OAuth credential/token used by Power BI Service for the Databricks source. Edit credentials will fix this issue temporarily.

 

Can you answer the questions below?

  • Recreate the Databricks data source credentials in the semantic model settings.
  • Confirm whether the connection uses a personal user OAuth login or a service principal.
  • Check if Conditional Access, MFA/session policies, or token lifetime policies changed.
  • Confirm the Databricks SQL warehouse/cluster is available during scheduled refresh.
  • Make sure all queries use the same Databricks server/HTTP path, so Power BI does not store multiple credentials for similar sources.

Service principal authentication for Power BI and Databricks:
https://learn.microsoft.com/en-us/azure/databricks/partners/bi/power-bi-m2m

Power BI refresh troubleshooting steps:
https://learn.microsoft.com/power-bi/connect-data/refresh-troubleshooting-refresh-scenarios

 

PLease consider this as an accepted solution if it helps or give it some kudos.

Thanks,

Hi @Lodha_Jaydeep 
Thank you for your answer! 

To answer some questions:
- The connection uses personal user OAuth login
Conditional Access, MFA/session policies, or token lifetime policies changed - where would I check that
- The Databricks SQL warehouse should be available during refresh 
- All queries use the same HTTP path 

I'd appreciate some further insight. 

Thank you

Here I am attaching some microsoft documentations, you can have a look to get the information. Can you allowed to update the connection to use service principal instead OAuth?

 

https://learn.microsoft.com/en-us/entra/identity/monitoring-health/how-to-view-applied-conditional-a...
https://learn.microsoft.com/en-us/entra/identity/conditional-access/troubleshoot-conditional-access
https://learn.microsoft.com/en-us/entra/identity-platform/configurable-token-lifetimes

 

Note: I used AI only to help paraphrase this response.

Hello, 
Thank you for those, I will have a look. In terms of changing to service principal - how would I do that? Would I need to create a new connection under 'Manage Connections and Gateways'? 
I'm not sure how that works. When I go to Settings -> Data Source Credentials -> Edit Credentials, I only have the following options as Authentication methods: OAuth2, Key, Basic. 

Thank you for your help 

Hi @koralka,

Your answer is in my 1st post. Please go through the documenataion for the service princiapal authentication. 

Hi @koralka ,

Thank you for reaching out to the Microsoft Community Forum. could you please try the proposed solution shared by  @Lodha_Jaydeep ? Let us know if you’re still facing the same issue we’ll be happy to assist you further.

 

Regards,

Dinesh

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.