Forum Discussion

Bessi's avatar
Bessi
New Member
2 months ago
Solved

Scheduled refresh fails with DMTS_OAuthFailedToGetResourceIdError — persists after forced re-auth (B

My semantic model fails on refresh in the Power BI Service with this error, in both scheduled and on-demand refresh: Error code: DMTS_OAuthFailedToGetResourceIdError "exceptionCulprit": 1 Cluster ...
  • Kiran-7312's avatar
    2 months ago

    Hi,

    The **DMTS** error during scheduled refresh is often related to the data source connection, gateway configuration, or authentication rather than the report itself.

    Could you please share:

    * The complete DMTS error code and message.
    * The type of data source you're using (SQL Server, SharePoint, Fabric, etc.).
    * Whether you're using an On-premises Data Gateway or a cloud connection.
    * Whether the refresh works successfully in Power BI Desktop but fails only in the Power BI Service.

    It would also be helpful to check that the gateway is online, the data source credentials are up to date, and the gateway version is current. These details will help the community identify the exact cause and suggest the most appropriate solution.

  • Bipin-Lala's avatar
    2 months ago

    Hi Bessi,

     

    The DMTS_OAuthFailedToGetResourceIdError means the Power BI background refresh engine cannot find the target location in the cloud. When it requests a secure access token from Microsoft Entra ID, the system rejects the request because the web path string it has on file does not map to a recognized, active Azure resource ID.

     

    The issue can most likely be a metadata mismatch caused by a backend change in Dynamics 365 Business Central

     

    1. Fix the path

    • Fix the Path in Power Query i.e. check and Re-align Environment Parameters in Power Query
    • If your environment was renamed or upgraded, manually update these text strings to reflect the exact current naming convention in your Business Central Admin Center.
    • Publish the report back to the Service to overwrite the broken dataset configuration.

     

    2. Reset the Cloud Credential Cache

    If the error persists after publishing, force the Power BI Service to purge the corrupted token from its memory:

     

    • Go to the dataset settings in the Power BI Service and expand Data source credentials.
    • Edit the Business Central connection and temporarily switch the Authentication Method from OAuth2 to Basic or Anonymous (this intentionally breaks the link and wipes the bad token).
    • Switch it right back to OAuth2, click Sign In, and re-authenticate cleanly with your organizational account.

    There can also be an issue of mismatched privacy levels that can also lead to this. Make sure it's set to organisational.

     

    Let me know if this helps!