Hi Everyone,
I have a document library that contains document that has custom permission (None inherits permission from the document).
I have a requirement where in if the document is published I would have to remove users with specific permission to it.
I.E:
Document 1:
user1: full control
user2: contribute
user3:edit
user4:custom
user5:custom
If the document is released, I would have to remove Users 4 & 5 since they have that specific permission in the document.
I've fount a REST Endpoint for it but it requires principadID (of the user) which I do not have since I wont not want to keep track of each document that has custom permissions.
Here is the code for removing permission for a specific user:
_api/lists/getByTitle('mylibrrary')/items(33217)/roleassignments/removeroleassignment(principalID=21,roledefid=1073741934)
As you can see it requires a principalID, is there an endpoint where only the roledefid can be provided and all users with the roledef will be removed from the permission list?
Thank you!

Report
All responses (
Answers (