Forum Discussion

Azsxdcfvgb's avatar
Azsxdcfvgb
Regular Visitor
28 days ago
Solved

[DataSource.Error] Credentials are required to decrypt this workbook

Hi all,

I got this error while trying to open an Excel workbook in Company SharePoint. The file isn't password-protected, there are no sensitivity labels. Not sure if it has anything to do with Purview encryption but that seems unlikely.
The solution proposed in this thread didn't work for me. Haven't found any other solutions in the forums. 
Any other solution to try ?
Thanks in advance

  • Hi Azsxdcfvgb​,
    Please make an unprotected test copy of the Excel file and refresh it. If that succeeds, the issue is with workbook encryption/sensitivity protection rather than the normal Power BI data-source credentials.
    Best Regards,
    Maruthi

10 Replies

  • Hi Azsxdcfvgb​,
    Please make an unprotected test copy of the Excel file and refresh it. If that succeeds, the issue is with workbook encryption/sensitivity protection rather than the normal Power BI data-source credentials.
    Best Regards,
    Maruthi

    • Azsxdcfvgb's avatar
      Azsxdcfvgb
      Regular Visitor

      Hi maruthisp​ I was able to create a local copy of the file and connect it. The problem might then be with the file. I will ask the file owner to look into this and mark this as solution once confirmed.

      • Azsxdcfvgb's avatar
        Azsxdcfvgb
        Regular Visitor

        The file had organisational level sensitivity label applied but wasn't visible because the label was configured after the file was created I think. I'm able to connect after removing the label.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi Azsxdcfvgb​,

    Since the local copy connects successfully, I would not assume the workbook itself is corrupt or inherently unreadable.

    That points more toward the SharePoint access/protection path.

    Microsoft’s SharePoint Folder connector documentation states that Power Query authenticates to SharePoint using an Organizational Account and that the user needs Read access to the site, document library, and folder path containing the file.

    I would test the same SharePoint file this way:

    1. In Power BI Desktop, clear the existing SharePoint permissions under Data source settings.
    2. Reconnect using the SharePoint Folder connector and sign in with your Organizational Account.
    3. Confirm that the same account can read the file, library, and parent folders in SharePoint.
    4. If possible, upload a copy of the same workbook to a different SharePoint library/folder with no special protection and test that copy.

    If the copied workbook works from another SharePoint location but the original does not, I would then check the original library/file for sensitivity labels, IRM, retention/protection policies, or library-level settings.

    Microsoft’s sensitivity label guidance for SharePoint and OneDrive also notes that encrypted Office files can behave differently depending on how the protection was applied.

    So I would not treat the word “decrypt” in the error as proof that the Excel workbook is password-protected. Given that the local copy works, I would first isolate whether SharePoint authentication or file/library protection is what Power Query is failing on.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

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

    Hi Azsxdcfvgb​ ,

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

    Regards,
    Chaithanya

    • Azsxdcfvgb's avatar
      Azsxdcfvgb
      Regular Visitor

      Hi Chaithanya, I'm waiting for the file owner to take a look at the original file and the solutions offered here hasn't helped unfortunately. Hopefully they respond soon enough.
      Regards

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

    Hi Azsxdcfvgb​ ,

    If you are still experiencing the issue, please share the latest error details here so that we can investigate further. If you need any additional assistance, please let us know. We’ll be happy to help.

    Regards,
    Chaithanya

  • jubinsoni's avatar
    jubinsoni
    Icon for Skilled Sharer rankSkilled Sharer

    Hi Azsxdcfvgb​,

    One cause that fits all your symptoms and hasn't come up yet: Information Rights Management (IRM) on the SharePoint document library, rather than on the file itself.

    With library-level IRM, the file has no password and no sensitivity label, so it looks unprotected. But SharePoint encrypts it whenever it leaves the library, and Power Query cannot open an IRM-protected workbook. When you opened it in Excel and saved a local copy, Excel decrypted it with your rights, which is why the copy connects fine.

    file in IRM-enabled library
    -> SharePoint encrypts on download
    -> Power Query: "Credentials are required to decrypt this workbook"
    
    same file opened in Excel and saved locally
    -> saved without IRM -> Power Query connects

    Quick checks the file owner or a site admin can do:

    Library settings > Information Rights Management
      -> is "Restrict permissions on this library on download" on?
    Excel desktop > File > Info
      -> any "Restricted Access" / protection banner on the file?

    If you or your admin use PnP PowerShell, the library setting can be checked directly:

    Connect-PnPOnline -Url "https://contoso.sharepoint.com/sites/Finance" -Interactive
    
    Get-PnPList -Identity "Documents" |
        Select-Object Title, IrmEnabled, IrmExpire, IrmReject

    If IrmEnabled is True, the practical fixes are:

    move the source workbook to a library without IRM
      (e.g. a dedicated "Power BI sources" library)
    -> repoint the query to the new path
    -> keep access controlled with normal SharePoint permissions

    IRM can't be bypassed from Power BI, so relocating the source file is usually the cleanest option.

    So my overall approach would be:

    confirm whether the library has IRM enabled
    -> if yes, move the source file to a non-IRM library
    -> if no, ask the owner to check the file's own protection
       in Excel (File > Info) and re-save without it

    That should explain why the original fails while every copy you make works.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

    • Azsxdcfvgb's avatar
      Azsxdcfvgb
      Regular Visitor

      Hi RossEdwardsRio​ 
      I did see that thread as well, tried the solutions provided in 2 other threads mentioned there but didn't work.