Copy file from SharePoint Online

Gayatri Krishnan 41 Reputation points

I am trying to build an ADF pipeline that download excel file from Sharepoint online. I have followed the necessary prerequisite steps as suggested in document

But still not luck. Web activity fails indicating unauthorized client. The app registration was successful on the Sharepoint online site and also related permissions shows it has AllSites.Read permission granted for it.

Not sure what am I missing. Any inputs how to resolve this error

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,539 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,862 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,771 Reputation points Microsoft Employee

    Hi @Gayatri Krishnan ,

    Thanks for using Microsoft Q&A !!
    If I understand correctly, your web activity is failing to get Sharepoint Online tokens using the registered application.
    By error message it looks like application registration or permissions issue.
    Are you checking permissions under Registred applications on Azure Active Directory blade on Azure portal?
    Can you please check your Sharepoint application principals site by going to https://{Sharepoint Name} if your application is showing up there.

    If not, then please try to follow step 2 - Grant SharePoint Online site permission to your registered application of the documentation. Please make sure you are passing the exact XML as mentioned like below

    <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Read"/>