Forum Discussion
[DataSource.Error] Credentials are required to decrypt this workbook
- 30 days ago
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
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 connectsQuick 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, IrmRejectIf 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 permissionsIRM 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 itThat 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.