cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Add contribute permissions to SharePoint Group on List Item via SP REST API

Hi

 

It is required to grant "Contribute" permissions on List Item in the "Item created" trigger using SharePoint REST API, below URI throws Http 400 error.

_api/lists/getByTitle('permissions')/items/(ID)/roleAssignments/addroleassignment(principalId=GroupId, roledefId=1073741827)

can the above requirement be met using Flow via SP REST API? 

 

Help appreciated.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Add contribute permissions to SharePoint Group on List Item via SP REST API

My mistake.

 

There is a forward slash in the URI after Item ID, which was the reason for failing. After removing that all is working as expected.

Copied the working URI for info below.

 

_api/lists/getByTitle('permissions')/items(ID)/roleAssignments/addroleassignment(principalId=GroupId, roledefId=1073741827)

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Add contribute permissions to SharePoint Group on List Item via SP REST API

If you are asking if you can set SharePoint permissions via Flow using a REST API call, the answer is yes per Serge Luca.

 

See blog post here

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Community Support
Community Support

Re: Add contribute permissions to SharePoint Group on List Item via SP REST API

Hi @RajuGolla,

 

As @ScottShearer said, add contribute permissions to SharePoint Group on List Item via SP REST API is supported currently.

 

Please refer to link below to learn set custom permissions on a list by using the REST interface

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/set-custom-permissions-on-a-list-by-using...

 

 

Best regards,

Alice

 

 

Highlighted
Frequent Visitor

Re: Add contribute permissions to SharePoint Group on List Item via SP REST API

My mistake.

 

There is a forward slash in the URI after Item ID, which was the reason for failing. After removing that all is working as expected.

Copied the working URI for info below.

 

_api/lists/getByTitle('permissions')/items(ID)/roleAssignments/addroleassignment(principalId=GroupId, roledefId=1073741827)

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

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

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (10,350)