Check if SharePoint Objects has unique permission from REST API.

Scenario – If you wanted to check if SharePoint object like web, list, list item has unique permission or not using REST API. This is be a quick tip post.

We would be using property named ‘hasuniqueroleassignments’ to check if permission is broken or not at any object level.

Web Level

Note – if you web object is of root, it will always return true as it means we are checking permission at site collection level.

/sites/blackwidow/_api/Web/?$select=hasuniqueroleassignments

List Level

/sites/blackwidow/_api/Web/Lists(@v0)/?@v0=guid'123123123-12312312-123-123-12312&$select=hasuniqueroleassignments

Item Level

/sites/blackwidow/_api/Web/Lists(@v0)/Items(@v1)?&@v0=guid'123123-123123-123123-123123-123123123'&@v1=1&$select=hasuniqueroleassignments

Hope this helps…Happy coding..!!!

(Visited 9 times, 1 visits today)