Hi,
I'm using SharePoint 2013 Workflow to assign List item permission to users using the REST Service.
First, I break the inheritance of the item using
http://<Sharepoint Site>/_api/Web/lists/GetByTitle('List1')/items(1)/breakroleinheritance(copyRoleAssignment=true)
Second, assigning permissions to User4 using
http://<Sharepoint_site>/_api/Web/lists/GetByTitle('List1')/items(1)/roleassignments/addroleassignment(principalid=21,roleDefId=1073741827)
an error "Value does not fall within the expected range." is thrown.
In http://<Sharepint_Site>/_api/Web/lists/GetByTitle('List1')/items(1)/roleassignment, only "Everyone", "User1", "User2" and "User3" are being inherited. How do I assign permissions to other users that are not inherited (E.g. User4, User5)?
Thanks in advance!