
Announcements
Have tried this in two environments without success just to be sure I'm not losing the plot.
Permission Error is 401: Unauthorised but the connection is a SharePoint Admin in both cases which makes me think it's something to do with the URI request or the Headers.
Flow Objectives / Actions
Manually Trigger
Copy folder (with subfolders and files)
Works Fine
HTTP Request to remove permissions and stop inheriting permissions
Where the issue is, see below.
Apply new permissions
Can't get to this because flow fails at step two
Flow
I just moved to new builder and now I am getting an error with one of the headers that I wasn't before.
The upside is there is now more information about the error but I still don't know how to fix.
HTTP Request Details
URI
api/Web/lists/getByTitle('Shared Documents')/items//BreakRoleInheritance(copyRoleAssignments=false,clearSubscopes=true)
Headings
Accept application/json;odata=verbose
Content-Type application/json;odata=verbose
X-RequestDigest *
IF-MATCH $("#_REQUESTDIGEST").val()
Error Output
{
"status": 401,
"message": "401 UNAUTHORIZED\r\nclientRequestId: 24589386-8add-4b8d-82c7-e31fdbe07a95\r\nserviceRequestId: b7ad12a1-20d3-3000-0af5-82323ece955e",
"errors": []
}
The endpoint is incorrect
It should start with _api/
Working with the SharePoint Send HTTP Request flow action in Power Automate | Microsoft Learn