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 / Need help using ShareP...
Power Automate
Unanswered

Need help using SharePoint REST API in Flow

(0) ShareShare
ReportReport
Posted on by 30

My goal is probably a common requirement.  Our HR team have a SharePoint list for Pay Authorisation requests and need the items to have restricted permissions where the Author, Approvers and HR team are the only ones allowed to view the contents.

I'm using the information in a blog by Serge Luca:
https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send-an-http-request-to-sharepoint-action-how-to-use-the-sharepoint-rest-api-in-flow/

The first part works just fine:Flow1.png

However I am getting Flow Failed error when I try to set the Author of the document:

 

Flow2.png

The Flow shows the error like this:

FlowUnauth.png

And the detail says:

 

<b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
 <br><br>

 <b> Requested URL: </b>/sites/<sitename>/_api/web/lists/getByTitle(&#39;Pay Authorisation&#39;)/items(8211)/roleassignments/addroleassignment(principalid=firstname.lastname@domain.com} ,roledefid=1073741826)<br><br>

 


What I don't understand is that both requests are very similar and post to the same document.  So I don't understand why one works and the other doesn't.  


I'd really appreciate any insights or assistance.

 



 

Categories:
I have the same question (0)
  • v-zhos-msft Profile Picture
    on at

    Hi @Fleur ,

    Could you please share a full screenshot of your flow's configuration?

    As the error message shown, the Http request can't find the resource.

    Please make sure you have set the correct value of 'principalid'.

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Fleur Profile Picture
    30 on at

    Thank you so much for responding. I was able to work out my error - just a pesky little space at the end of the api code!  Lesson learned. 

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard