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 URI: WABI-WEST-EUROPE-E-PRIMARY-redirect.analysis.windows.net

 

The model pulls from Dynamics 365 Business Central (OAuth2 / Organizational account) plus a few anonymous Web API sources. 

The same account works fine logging into Business Central directly and can see the production company.

What I have already tried, with no change:
- Cleared and re-entered the Business Central credential (OAuth2, Organizational account)
- Forced a fresh sign-in using app.powerbi.com?alwaysPromptForContentProviderCreds=true after signing out of my Microsoft account
- Confirmed I sign in with the SAME account I use for the Power BI Service, same tenant
- Verified all other (Web/Anonymous) sources have valid credentials

- Tried taking over which didn't work

It still fails with the identical error and a fresh Activity ID each time.

 

What can i do to fix this, so i can autorefresh without issues?

  • 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.

  • 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!

5 Replies

  • Bessi, Can you conform below things.

     

    1. Have you connected your API source and D365 business central using cloud gateway in the power bi service?  
    2. Does they are shoing Active and online.

     

    Things you can try:

     

    1. Open report in the desktop and clear the data source settings and reconfiure all things from scratch.
    2. Publish to serivce and map your gateway connection.

     

    Please let me know your findings for same, glad to assist further if needd.

  • 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.

  • 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!

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi Bessi 

    We appreciate your inquiry through the Microsoft Fabric Community Forum.

    We would like to inquire whether have you got the chance to check the solutions provided by Bipin-Lala Kiran-7312 Lodha_Jaydeep to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

    Thanks 
    Srikanth Cheri
    Community Support Team.

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi Bessi 
     We are following up to check if you had a chance to review the solution provided in community. We hope it helped resolve your issue.

    If you are still experiencing the issue or need any further assistance, please let us know. We will be happy to assist you further.


    Thanks,
    Srikanth Cheri
    Community Support Team