Forum Discussion

yamyam1's avatar
yamyam1
New Member
11 days ago

New, consistent refresh failures

I've been getting this error but have tried to re-authenticate my 4 source spreadsheets, and the error persists. How can I fix this?

 

Data source error: {"error":{"code":"DMTS_OAuthFailedToGetResourceIdError","pbi.error":{"code":"DMTS_OAuthFailedToGetResourceIdError","parameters":{},"details":[],"exceptionCulprit":1}}}

9 Replies

  • v-saisrao-msft's avatar
    v-saisrao-msft
    Community Support

    HI yamyam1,

    Checking in to see if your issue has been resolved. let us know if you still need any assistance.

     

    Thank you.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Impactful Individual

    Hi yamyam1,

     

    Since reauthenticating all four spreadsheets did not resolve it, I would next check how each file is connected rather than repeating the sign-in process.

     

    In the Power BI Service, open the semantic model’s Settings and review Gateway and cloud connections or Data source credentials. I would confirm that every spreadsheet source is mapped to the expected connection and uses OAuth2 with an account that can still access the file.

     

    If the spreadsheets are stored in SharePoint Online or OneDrive for work or school, I would also check the following:

    • All files are in the same Microsoft 365 tenant as Power BI.
    • The account used for OAuth is the same organizational account that has access to the files.
    • The Power Query sources use consistent SharePoint site addresses rather than a mixture of sharing links, redirected URLs and direct file URLs.
    • The authentication scope is applied at the correct SharePoint site level.

    Microsoft notes in its Power BI refresh troubleshooting guidance that SharePoint Online OAuth refresh requires the appropriate organizational account and does not support cross-tenant OAuth scenarios. For OneDrive or SharePoint-hosted files, Microsoft also recommends selecting OAuth2 in the refresh settings, as explained in its guidance for importing SharePoint and OneDrive files.

     

    I would then open the PBIX in Power BI Desktop, go to File → Options and settings → Data source settings, clear the permissions for the affected sources, reconnect, refresh successfully in Desktop and republish. Microsoft documents this credential-management process in its Power Query authentication guidance.

     

    If the queries currently use copied sharing links or the generic Web connector, I would consider rebuilding them with the SharePoint Folder connector and the root site URL. Microsoft’s SharePoint Folder connector documentation provides the supported connection pattern.

     

    The most useful next detail would be whether the four spreadsheets are in SharePoint, OneDrive or another service, and whether they all use the same tenant and connection method. That should help narrow down which source is preventing Power BI from resolving the OAuth resource.

  • Hi yamyam1 

     

    If you can confirm that your password hasn't changed, as sometimes a new password can cause these issues.

  • Try clearing the permissions for all four data sources from Data Source Settings, restart Power BI, and sign in again. Also check that all sources are using the same authentication method and that your account has the required access to the files. This should resolve the OAuth-related error.

  • Ray_Minds's avatar
    Ray_Minds
    Solution Supplier
    Here are the most common causes and how to troubleshoot them.
     
     Verify the actual data source
    This error is most commonly seen with SharePoint Online and OneDrive sources when the OAuth token or URL no longer matches.
     
    1. Remove and re-enter the credentials in power Bi Service
     
    1. Go to Workspace → Semantic model → Settings
    2. Open  Data source credentials
    3. edit the credential
    4. Sign in again using OAuth2 / Organizational account
     
    2. Check whether the file location changed or not from the actual location which we're using
     
    * does anyone moved the spreadsheet ?
    * does anyone renamed the SharePoint site ?,
    * does anyone changed the document library ?,
    * or switched from a personal OneDrive to a SharePoint Team Site
     
    In that case the stored OAuth resource may no longer be valid.
     
    3. We can also debug in the power bi Desktop Local
     
    1. Open Transform Data in Power Query
    2. Click on the Data Source Setting from the ribbon
    3. Then click on the Data Source in the current file
    4. Edit Permission Then edit the credential
    5. Use OAuth2 authentication and privacy level will be organizational and then ok
     
    4. Test a manual refresh in Desktop
    * Refresh locally.
    * If it succeeds, republish the dataset.
    * If it fails locally, Power Query may identify which source is causing the issue.
  • yamyam1 The suggestions so far all come back to re-entering the credentials, and your first sentence already says you did that across all four spreadsheets and the error persisted. I'd treat that as information rather than something to repeat, because a credential prompt can only fix a credential, and there's a documented way to break a file-based source that no amount of re-authenticating will touch.

     

    Microsoft's data refresh doc says this about files hosted on OneDrive or SharePoint Online: "You can move the file to another location (using drag and drop, for example) and refresh will continue to work because Power BI still knows the file's item ID. However, if you copy that file to another location, a new instance of the file and new item ID is created. Therefore, your Power BI file reference is no longer valid and refresh will fail." That distinction is sharper than it looks, and it's the reverse of what most people check. Moving a spreadsheet is safe. Copying one is not.

     

    So the question isn't whether the files moved, it's whether any of the four quietly stopped being the same file. A Save As over the top, a new version uploaded rather than edited in place, a restore from the recycle bin or a backup, a library or site migration, someone rebuilding the sheet and re-uploading it. Every one of those produces a new item ID sitting at the same path, so it looks completely normal in the browser while Power BI is still holding a reference to something that no longer exists.

     

    Two things worth pinning down before you change anything else. Which of the four is actually failing? With four spreadsheets it's easy to spend an afternoon re-authenticating three that were never broken. And your own title says new and consistent, which is a useful detail rather than a throwaway one, because a token or throttling problem tends to come and go, while a reference pointing at a file that no longer exists fails every single time in exactly the same way. Consistent fits the second one better than the first.

     

    When did the first failure land, and does that date line up with anything being re-uploaded, restored or migrated on the SharePoint or OneDrive side of things?

    • yamyam1's avatar
      yamyam1
      New Member

      Someone moved a source spreadsheet and moved it back. How do I fix this?

      • v-saisrao-msft's avatar
        v-saisrao-msft
        Community Support

        Hi yamyam1,

        Have you had a chance to review the solution shared by PauReis? If the issue persists, feel free to reply so we can help further.

         

        Thank you.