Azure Logic App error when connecting to external SharePoint Site

KelMel 1 Reputation point
2020-10-08T21:01:03.64+00:00

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!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,136 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,694 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,441 Reputation points
    2020-10-09T13:32:53.167+00:00

    Hi @KelMel

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.