Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Need help using SharePoint REST API in Flow

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:

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:



The Flow shows the error like this:


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.

            <b> Requested URL: </b>/sites/<sitename>/_api/web/lists/getByTitle(&#39;Pay Authorisation&#39;)/items(8211)/roleassignments/addroleassignment(} ,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.



Solution Sage
Solution Sage

Re: Need help using SharePoint REST API in Flow

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.

Advocate II
Advocate II

Re: Need help using SharePoint REST API in Flow

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. 

Helpful resources


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (9,407)