1

I have a list with each list item has unique permission. Now I need to remove specific user from the item level permission using Power Automate.

I know there is REST endpoint for removing group but not user:

_api/web/lists/getByTitle('[LIST_TITLE]')/items([ItemID])/roleAssignments/groups/removebyid([Group_PRINCIPLE_ID])]

kindly help me on this.

2 Answers 2

1

There is a REST endpoint to remove user permissions from list item.

Use this endpoint:

<siteUrl>/_api/web/lists/getbytitle('<listName>')/items(<ID>)/roleassignments/removeroleassignment(principalid=<userID>,roleDefId=1073741827)

Replace <userID> with the actual user ID.

Microsoft documentation: Users, groups, and roles REST API reference

2
  • Thanks for the suggestion. I actually want to remove the user directly from the item level permission means let's saya user xyz is there having permissions showing as 'Contribute,Edit,Read'. Now if I use above api I need to make 3 http call instead I want to remove the user from the permission settings page of the item. Jan 15, 2021 at 3:19
  • How and why are you adding multiple permission levels to same user on single item? is it coming from group permissions? Jan 18, 2021 at 11:55
0

To remove all roleassignments, use the following endpoint (with a POST):

<siteUrl>/_api/web/lists/getbytitle('<listName>')/items(<ID>)/roleassignments/removeroleassignment(principalid=<userID>)

Note the omission of the parameter "roleDefId".

Or, if you prefer, use a DELETE to this endpoint:

<siteUrl>/_api/web/lists/getbytitle('<listName>')/items(<ID>)/roleassignments

Note that the second approach will throw an error if the user has no existing roleassignments, whereas the first approach will not fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.