3

To add a custom permission to a List or an item, we can use SPRoleAssignmentCollection and we can also use AddToCurrentScopeOnly to avoid adding users with Limited Access permission to the parent.

In REST API, there is an endpoint for RoleAssignmentCollection and RoleAssignment. How do I use AddToCurrentScopeOnly with REST API? I did not find any reference in MSDN article.

Any pointers please?

  • how about something like https://site-url/_api/web/lists/getByTitle('Test')/roleassignments/AddToCurrentScopeOnly(roleDefId=1073741828) and making a post request to this endpoint – Gautam Sheth Feb 6 '18 at 10:49
  • @Gautam, it did not work. Got ResourceNotFoundException. – Suresh C Feb 6 '18 at 11:06
0

Looks like Microsoft has not added this method to any of the client side APIs. This feature has already been suggested in SharePoint User Voice portal. I just voted this suggestion. You can also vote for it.

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.