Forum Discussion
Help - API method /breakroleinheritance not working
- Feb 23, 2024
WeibchenL Try using API like below based on item ID:
_api/web/lists/GetByTitle('Documents')/items(5)/BreakRoleInheritance(CopyRoleAssignments=true, ClearSubscopes=true)
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
As I do understand my error description, it does find the folder in which I want to break the roleinheritance but the error occurs because it can't find the ressource breakroleinheritance. Does that make any sense?
WeibchenL Try using API like below based on item ID:
_api/web/lists/GetByTitle('Documents')/items(5)/BreakRoleInheritance(CopyRoleAssignments=true, ClearSubscopes=true)
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- WeibchenLFeb 23, 2024Copper ContributorI really don't know how, I tried so many combinations, also I couldn't get it to work with your first response. But based on item ID it worked!
Thank you so much, I could bake you a cake.
Maybe I will if you ever visit Palatinate (Region in Germany) xD- ganeshsanapFeb 23, 2024MVP
WeibchenL You are welcome, I am glad it worked for you!
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.