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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,902)