Рет қаралды 5,806
This video explains how can break inheritance at list level and provide unique permissions to User.
Please watch full video to understand the full step by step process.
Below are URL endpoints along with headers:
/_api/web/lists/getByTitle('Product Sales')/breakroleinheritance(copyRoleAssignments=true, clearSubscopes=true)
Headers
========
Accept application/json;odata=verbose
content-Type application/json;odata=verbose
To get Site User
===========
/_api/Web/Siteusers
To get Role Definition ID
================
/_api/web/roledefinitions
To get user id by email
==============
/_api/Web/Siteusers/getByEmail('krishan.sharma@XXX.onmicrosoft.com')
To Provide unique permission with Role definitions ID and Principal ID
===============================
_api/web/lists/getByTitle('Product Sales')/roleassignments/addroleassignment(principalid=7,roleDefId=1073741829)