Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

PowerBI refresh failed when connected to databricks- DMTS_OAuthTokenRefreshFailedError

Hi, Could someone please help with the issue below: We have a PowerBI report that is connected to the databricks using an Import mode. We are using OAuth as the authentication mode. The report...
  • v-ssriganesh's avatar
    1 year ago

    Hi Anonymous,

    Thanks for reaching out about the refresh failure you're experiencing with your Power BI report connected to Databricks. I understand that the report was refreshing successfully for several days but started failing with a "DMTS_OAuthTokenRefreshFailedError" once a week.

    This error typically indicates an issue with refreshing the OAuth token used for authentication between Power BI and Databricks. Here are some possible causes and solutions to troubleshoot the problem:

    You mentioned that the Databricks cluster stays disabled until a query hits it. This auto-shutdown behavior might be causing the token to expire before the scheduled refresh. To address this:

    • If possible, adjust your Databricks cluster settings to remain active for a specific period or continuously run low-resource queries to prevent automatic shutdowns. Alternatively, consider scheduling a simple query to the Databricks cluster just before your Power BI refresh. This will ensure the cluster is active and the token is valid for refresh.
    • Investigate the expiration time of OAuth tokens issued by Databricks. If they expire frequently (e.g., daily), it might lead to refresh failures around that time.
    • see if there's an option on the Databricks side to extend the validity period of OAuth tokens. This would reduce refresh attempts and potential failures.
    • While reauthenticating credentials in Power BI service after the refresh failure seems to resolve the issue temporarily, it's not an ideal long-term solution.

    If these solutions do not resolve the issue, please consider contacting Databricks support or raising a Microsoft support ticket. You can create a Microsoft support ticket using the link below:
    https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket

    If this helps then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
    Hope this works for you!
    Thanks.