Fabric Data Days Monthly is back. Join us on March 26th for two expert-led sessions on 1) Getting Started with Fabric IQ and 2) Mapping & Spacial Analytics in Fabric. Register now
Hi,
I have a created shortcut to a SharePoint file and it is available in my file section in the lakehouse, as can be sen below
Now i am trying to use the copy job to load the file to a table.
However, once i fill in the fields, and try to view the data (preview)
The error message is:
Only '.xls' and '.xlsx' format is supported in reading excel file while error is ' at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.DataTransfer.ClientLibrary.MultipartSequentialReadSource.<ReadBuffersInSequential>d__5.MoveNext()
at Microsoft.DataTransfer.ClientLibrary.TransferStream.ReadInternal(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.DataTransfer.ClientLibrary.TransferStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.DataTransfer.ClientLibrary.SizeBoundedTransferStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.DataTransfer.ClientLibrary.TransferStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.Fill()
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadLeByte()
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadLeInt()
at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()
at NPOI.OpenXml4Net.Util.ZipInputStreamZipEntrySource..ctor(ZipInputStream inp)
at NPOI.OpenXml4Net.OPC.ZipPackage..ctor(Stream filestream, PackageAccess access)
at NPOI.OpenXml4Net.OPC.OPCPackage.Open(Stream in1)
at NPOI.Util.PackageHelper.Open(Stream is1)
at NPOI.XSSF.UserModel.XSSFWorkbook..ctor(Stream is1)
at Microsoft.DataTransfer.ClientLibrary.ExcelUtility.GetExcelWorkbook(String fileExtension, TransferStream stream)'.
One or more errors occurred.
Lakehouse failed for forbidden which may be caused by user account or service principal doesn't have enough permission to access Lakehouse. Workspace: '5fe665f0-8968-40f4-8595-00ec5ea0b5e0'. Path: '6db950dd-f180-448e-8722-eb9901339a3f/Files/EXCEL/Bestuurlijkgoedgekeurd/Bronbestand kredieten.xlsx'. ErrorCode: 'AuthenticationFailed'. Message: 'Forbidden'. RequestId: '532ffe5a-d2f0-4f53-9316-511148079121'. TimeStamp: 'Thu, 22 Jan 2026 18:46:02 GMT'..
Operation returned an invalid status code 'Forbidden'
Activiteits-id: d09a73a9-9b69-48b6-81ba-6e6c3edfbddd
I found this strange, since it is an xlsx file. I have double checked naming.
Besides i have a service principle with access to both the workspace and the sharepoint file location (i.e. team file).
Next tho this, i also tested it with a csv file and an excel file without multiple tabs, all are not working and gave the 'forbidden' error,
Does anyone experience this as well?
The funny thing is that if i read the exact same file from a blog storage in azure it simply works!
Hi v-veshwara-msft,
Thanks for you response. I am currently checking the graph API permissions.
I have added extra rights (i.e. Sites.Selected) explicitly, but i am waiting for my IT department to grant access to them.
If done I can do the final test.
For the rest everything should be ready.
Will come back once I know more.
Hi @benitovbreugel ,
Just checking in to see if you were able to complete the test after the Sites.Selected permission and site level access were granted.
Please let us know the outcome when you have a chance.
Thank you.
Hi,
Unfortunately, the additional permission right did not solve the issue. The error is still there.
So I am still searching what the issue could be.
Hi @benitovbreugel ,
Thanks for the update.
Since the permissions were updated and the issue still persists, and given that the shortcut is accessible but the Copy activity continues to return a Forbidden error, this may require deeper investigation from the product team.
At this stage, I would recommend raising a Microsoft support ticket so the support team can review the backend activity logs and authentication flow in detail.
Please feel free to share any updates here once you hear back.
Thank you.
Hi @benitovbreugel ,
Just following up to check if there are any updates on this issue. If you were able to raise a support ticket or received further findings, please feel free to share them here.
Thank you.
Hi @benitovbreugel ,
Thank you for the update. Please proceed with the test once the Sites.Selected permission and site level access are granted, and let us know the outcome.
Hi @benitovbreugel ,
Thanks for reaching out to Microsoft Fabric Community.
Based on the behavior described, this issue is related to SharePoint permissions for the service principal rather than the Excel file format or Copy activity configuration.
Please ensure the service principal has the Microsoft Graph Sites.Selected application permission granted in Entra ID and that admin consent has been applied. If Sites.Selected is used, it does not provide access by itself. The service principal must be explicitly granted permissions on the SharePoint site or document library backing the shortcut. This can be done using supported SharePoint permission assignment methods such as AppInv.aspx, Microsoft Graph, or SharePoint Online PowerShell.
Also note that Fabric workspace permissions are not sufficient. The service principal must be authorized directly at the SharePoint site level in order to read files through OneLake shortcuts.
Relevant documentation and similar threads:
Accessing SharePoint using an application context, also known as app-only | Microsoft Learn
Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn
Overview of Microsoft Graph permissions - Microsoft Graph | Microsoft Learn
How to give Sharepoint folder granular access to a Service Principal ? - Microsoft Q&A
Please review these configurations and let us know if the issue continues after validating the SharePoint permissions.
Hope this helps. Please reach out for further assistance.
Thank you.
Hi @benitovbreugel ,
Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.
Thank you.