1

I try to clear assignment to a SharePoint folder. When I test it is not showing any error but appears this:

"BreakRoleInheritance": null

And the folder maintain the same permissions.

The definition of the http is:

_api/lists/getByTitle('Documents')/items(214)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)

Where 214 is the ID of the folder.

Do you know where is the mistake?

2
  • Do you have Edit/Full control permissions on document library/folder? Commented Oct 10, 2021 at 15:27
  • Please Upvote(^) and accept as an Answer if my reply helped you in any way & it will help others with similar question in future to find the correct answer easily. Commented Oct 21, 2021 at 11:06

1 Answer 1

0

To break permissions inheritance on folder inside document library, you have to use the REST endpoint like:

_api/web/GetFolderByServerRelativeUrl('/Documents/folder1')/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)

References:

  1. Manage File permissions using REST API
  2. Break inheritance on a folder using REST
  3. Sharepoint Rest API breakRoleInheritance Of Folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.