Hi @Sharad Ghallal
Thank you for posting your query!
We understand that you are encountering a 401 Unauthorized
error while copying files from SharePoint Online to an ADLS container using Azure Data Factory (ADF), which is likely due to authentication
or permission
settings.
Here are a few key areas to check and resolve the issue:
Ensure that the Application ID
used in ADF is properly registered in SharePoint Online
and that the necessary API permissions
are granted, including Sites.Read.All
or Sites.FullControl.All
for site access and Files.ReadWrite.All
for file operations. After making any changes, make sure to grant admin consent
in Azure AD
to apply the permissions successfully.
If your using Service Principal Authentication
, ensure that the correct Client ID, Client Secret, and
Tenant ID
are configured in the ADF Linked Service
for SharePoint.
For App-Only Authentication
, ensure that the App Identifier (Client ID & Secret)
is added to SharePoint’s AppInv.aspx
and granted the appropriate site permissions.
Ensure that Conditional Access policies, IP restrictions, or MFA
are not blocking authentication and that the ADF service principal
is exempted if necessary.
Please refer to the Microsoft documentation below, as it will help you resolve the issue.
https://learn.microsoft.com/en-us/answers/questions/999634/copy-files-from-sharepoint-to-azure-datalake-using
https://learn.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list?tabs=data-factory
Please let us know if you need additional guidance, and we are happy to assist.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.