0

Can anyone confirm if you've encountered the following scenario?

I assigned a custom permission on a list item via REST API, using the workflow activity designer in VS 2013. I successfully broke and assigned custom permission supposedly for 1 user only, using the REST call.

https://your_sp_site.sharepoint.com/_api/web/lists/getByTitle('Test')/roleassignments/addroleassignment(principalid=<userid>,roleDefId=<roledefid>) 

But when I checked the list item it also lists the peers of that account. Is there a way to not include the peers when assigning the permission?

Thanks!

  • What do you mean by Peers? – Vamsi K K Sep 11 '15 at 0:50
  • I think the peers are related to having the same Manager? I was checking the json and I saw that peers with the same manager are there as well. – adzydoodles Sep 11 '15 at 0:53
  • I am not understanding how the Peers concept affects the permissions on a list item! Peers can belong to different groups and thus can have different permissions on the same list item! Please see my answer if that helps! – Vamsi K K Sep 11 '15 at 0:57
0

If you are thinking of setting unique permissions on a list item so that it is accessible to only one user, you need to first break the inheritance

/_api/web/lists/getByTitle('Test')/breakroleinheritance(copyRoleAssignments=**false**, clearSubscopes=**true**)

Now, you can add role assignment the way you did it.

  • I already broke inheritance then added the permission. – adzydoodles Sep 11 '15 at 0:57
  • Ok and you made sure that you are not copying role assignments when you are breaking inheritance? I would help if you update the question to add this details also! – Vamsi K K Sep 11 '15 at 0:59
  • Yes,I used <siteurl>_api/web/lists/getByTitle('Event Lines')/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true) – adzydoodles Sep 11 '15 at 1:06
  • With regards to the peers concept, I'm actually granting permission to the manager of the user I'm adding. When I tried to grant permission to a user with no peers there were no additional users added to the item level permission. – adzydoodles Sep 11 '15 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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