question

KelMel-6392 avatar image
0 Votes"
KelMel-6392 asked MohammadAmer commented

Azure Logic App error when connecting to external SharePoint Site

I created an Azure Logic App to move files from an external SharePoint site to Azure Data Storage. I have access to the root folder of this external site, but when I use the SharePoint connection to move files "when a file is created" on the external SP Site, I get the following error:

Error code: '401', Message: 'Unable to access the Folder in dataset https://traxtech.sharepoint.com/. Ensure that you have the right Permissions. clientRequestId: 26A9EDF0-8550-4602-B6D8-49C443688375 serviceRequestId: edc2819f-409c-2000-d7c9-e25b4bff2ae8'. Client request id: '26A9EDF0-8550-4602-B6D8-49C443688375'

I have successfully setup file movement logic apps for internal SharePoint sites with no issues. I do have access to this external SP Site at the root level so not sure why it does not allow me to find the SP folder?

Any assistance would be greatly appreciated!

office-sharepoint-onlineazure-logic-apps
· 3
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.

I believe the issue is I cannot access the root Sharepoint site. I have access to folders within this site, but not the root.

0 Votes 0 ·

Hi @KelMel-6392

Following up to see if you have tested with permission having root access to the SharePoint site and helps you.

0 Votes 0 ·

Hi @KelMel-6392

I have the same issue when using SharePoint actions to connect to SharePoint 2019 through the on premises data gateway however I can connect, see, read and write to SharePoint using the browser.

This one
"status": 401,
  "message": "Unable to access the Folder in dataset https://rootsite/sites/samplesite. Ensure that you have the right Permissions.\r\nclientRequestId: eb336ab0-b1cd-4d92-8317-c49a7e15f7d6\r\nserviceRequestId: fb968e9f-2aa3-102c-6466-63682180035b",
  "source": "",
  "errors": []

did you figure out what was the issue?

Regards,

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

Hi @KelMel-6392

I have looked into backend logs and I can see that the authentication is getting failed from the Sharepoint end.
I can see that this URL call /_api/web/GetFolderByServerRelativePath(decodedUrl=@p)?$expand=Folders,Files&@p='%2f'" that is getting failed as the user does not have the required permission. As you have mentioned looks like your user need might need to have access to the root SharePoint site. Can you provide the root access to the user and reconfigure it again and see if it helps you. Looking into the GetFolderByServerRelativePath document from SharePoint end I don't see what permission needed. I have also added office-sharepoint-online tag so the team can comment on what permission the user needed for this REST call.

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.