question

GayatriKrishnan-9239 avatar image
0 Votes"
GayatriKrishnan-9239 asked SaurabhSharma-msft answered

Copy file from SharePoint Online

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 https://docs.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list?tabs=data-factory#copy-file-from-sharepoint-online

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-data-factoryazure-synapse-analytics
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered

Hi @gayatrikrishnan-9239,

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}.sharepoint.com/_layouts/15/appprincipals.aspx?Scope=Web if your application is showing up there.
193572-image.png

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"/>
</AppPermissionRequests>

Thanks
Saurabh


image.png (32.5 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @gayatrikrishnan-9239,
We haven't heard back from you. Just wanted to check if you are you still facing the issue? In case If you already found a solution, would you please share it here with the community? Otherwise, let us know and we will continue to engage with you on the issue.

Thanks
Saurabh

0 Votes 0 ·

Hi @gayatrikrishnan-9239,
Please let me know if you need any help on this issue.

Thanks
Saurabh

0 Votes 0 ·