Hello,
I am building a flow which would require to remove permission for an individual and assign it to a different person for a folder.
What i tried was to use this :
But i get a "Folder is not supported"
After reading a lot, it seems that certainly the above just works for ListItems and Files.
Another alternative I thought was to use the REST API: _api/lists/getByTitle('Documents')/items('item')/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)
The above simply breaks the inheritance which can result in deleting some permssions if these are not part of the parent, but it's not a valid workaround.
My question is if there is any way to remove individual , or all if necessary, permission on a folder via REST API maybe?
Thanks
Pedro
Hi @Pedrogr90
The above should work. Can you please share a little bit more of your Flow so that I can try to help you.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Hi @Pedrogr90 ,
Have you figured this out? After you break the inheritance, to remove an individuals permissions from a folder/item, you can send another HTTP request to remove the user. Here are the steps from beginning to end.
STEP 1. Send an HTTP request to break inheritance.
_api/lists/getByTitle('ListName')/items(itemID)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)
Example:
STEP 2. Get the principle id of the user you want to remove and set it to a variable.
STEP 3. Send an HTTP request to remove the user from item
_api/lists/getByTitle('ListName')/items(itemID)/roleassignments/removeroleassignment(principalid=CreatedByPrincipleID)
Example:
Hope this helps!
Darren