This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA 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.
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.
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?
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
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 7 |
| User | Count |
|---|---|
| 28 | |
| 25 | |
| 22 | |
| 21 | |
| 21 |