Skip to content
Yourmodernworkplace

How to Set permissions for a SharePoint list item

April 5, 2022

I got question the other day on how to remove permissions on a SharePoint List item using Power Automate so here is a quick guide:

  1. Create an Automated Flow

  2. When an item is created:

  1. Send Http Request to SharePoint (Break List Item Inheritance)
| Name        | Value                                                                                                                           |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| *Site Address |https://YOURURL.sharepoint.com/sites/yourSite                                                                                                                 |
| *Method   | POST                                                                                                                     |
| *Uri | _api/web/lists/getByTitle(ListUrl)/items/getById(FileID)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true) |

  1. Get User Profile(V2):

The user that not allowed to see this UPN/Mail

  1. Send Http Request to SharePoint (Remove User from List item)
| Name        | Value                                                                                                                           |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| *Site Address |https://YOURURL.sharepoint.com/sites/yourSite                                                                                                                 |
| *Method   | POST                                                                                                                     |
| *Uri | _api/web/lists/getbytitle(ListUrl)/items(FileID)/roleassignments/removeroleassignment(principalid='userID',roleDefId=1073741827) |

  1. Visit the list item and you can see the inheritence being broken

Whole Flow: