SharePoint REST API to retrieve ACLs of a SharePoint object

BrajMohan Singh 1 Reputation point
2020-12-23T10:27:24.263+00:00

Hi,

We have a requirement to retrieve Access Control List details of a particular SharePoint object(site, list or list item). We came across an article which talks about SharePoint RoleDefinitions and RoleAssignments which control the user access to SharePoint objects. We also found another article which has details of the REST APIs to retrieve Role Assignments and Role Definitions. We tried retrieving Role Assignments for a Site using

GET <Site_URL>/_api/web/roleassignments?$expand=Member/users,RoleDefinitionBindings  

 

REST API. The response contains the SharePoint Groups and Users and their RoleDefinitionBindings.

We wanted to know if there is any other way to retrieve Access Control List details of a SharePoint object using REST API?

Any leads will be appreciated.

Thanks,

Brajmohan Singh

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,702 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-12-24T02:27:57.237+00:00

    Retrieve Role Assignments for a list:

    /_api/web/lists/getbytitle('list title')/roleassignments?$expand=Member/users,RoleDefinitionBindings  
    

    Retrieve Role Assignments for a listitem:

    /_api/web/lists/getbytitle('list title')/items(id)/roleassignments?$expand=Member/users,RoleDefinitionBindings  
    

    Check if site/list/listitem has a unique permission:

    /_api/web/HasUniqueRoleAssignments  
    /_api/web/lists/getbytitle('list title')/HasUniqueRoleAssignments  
    /_api/web/lists/getbytitle('list title')/items(id)/HasUniqueRoleAssignments  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.