Forum Discussion
WeibchenL
Feb 23, 2024Copper Contributor
Help - API method /breakroleinheritance not working
Hello everyone, I need help with the breakroleinheritance method, which isn't working. Error Code 404 states that the ressource can't be found (free translated). All articles I looked through say...
- 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.
WeibchenL
Feb 23, 2024Copper Contributor
If I change the content inside the brackets, it says that it cannot find it. Also, it would be ideal if the folder (item)ID could be used somehow, which does not seem to be possible if i take a part uf the URI for server relative URL.
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?
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?
ganeshsanap
Feb 23, 2024MVP
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.