I have a site accessible by everyone in our organization, inside this site, one library. In this everybody can create folder to upload the files, this is happening through provider hosted app using rest queries. Once user creates the folder, what i am trying to do is breakRoleInheritance on this folder and assign role only for creator of this folder and another two users. Braking the role inheritance and assigning the role is being done by rest queries as below : https://my.sharepoint.com/sites/Service_Request_Test/_api/web/GetFolderByServerRelativeUrl('RA_PIServiceRequestDocLib/641')/breakroleinheritance(copyRoleAssignments=true, clearSubscopes=true)
https://my.sharepoint.com/sites/Service_Request_Test/_api/web/GetFolderByServerRelativeUrl('RA_PIServiceRequestDocLib/641')/roleassignments/addroleassignment(principalid=1156,roleDefId=1073741828)
When i run there queries, i get the below error message as "Cannot find resource for the request breakroleinheritance" and "Cannot find resource for the request roleassignment" respectively.
Here Service_Request_Test is the site, RA_PIServiceRequestDocLib is document library, 614 is the folder.
Kindly request you help on this.