I have a SharePoint Online farm. I am trying to break inheritance on a folder in a document library, and then assign permissions to user(s), all via the REST API.
I can run this command successfully (a folder object is returned):
https://mysite/_api/web/GetFolderByServerRelativeUrl('/DocLib/folder1')/
But when I try to run this command I get a 403 Forbidden error:
https://mysite/_api/web/GetFolderByServerRelativeUrl('/DocLib/folder1')/breakroleinheritance(copyRoleAssignments=true,clearSubscopes=true)
What am I missing here?