web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 401: Unauthorised Erro...
Power Automate
Unanswered

401: Unauthorised Error When Using HTTP Request

(0) ShareShare
ReportReport
Posted on by

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

  1. Manually Trigger

  2. Copy folder (with subfolders and files)

    1. Works Fine

  3. HTTP Request to remove permissions and stop inheriting permissions

    1. Needs to apply to the parent folder, and folders and files within
    2. Where the issue is, see below.

  4. Apply new permissions

    1. 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. 

It appears that the 'uri' parameter in the 'Send an HTTP request to SharePoint' action is referencing a SharePoint API endpoint that requires authentication, but the 'Authorization' header is missing or empty. Double-check that the 'Authorization' header is correctly set with a valid access token or authentication token.
 

 

MJLewis_0-1709849797858.png

 

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",

"source": "https://orbservices.sharepoint.com/sites/clientops/api/Web/lists/getByTitle('Shared%20Documents')/items/%252fShared%2bDocuments%252fActive%2bProjects%252f08_Custom2/BreakRoleInheritance(copyRoleAssignments=false,clearSubscopes=true)",

"errors": []

}

 

 

 

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    The endpoint is incorrect

    SudeepGhatakNZ_0-1709852450391.png

     

    It should start with _api/

    Working with the SharePoint Send HTTP Request flow action in Power Automate | Microsoft Learn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard