Error "attempted to perform an unauthorized operation" when attempting to run a RoleAssignments request with REST API

svbianca5280 21 Reputation points
2021-08-10T21:19:29.117+00:00

We are trying to run a REST call to get RoleAssignments for a SharePoint online site. The error I am getting is "attempted to perform and unauthorized operation". This seems like a permissions issue but I am not sure what permissions are needed or where to assign them?

This is essentially what I am trying to use:

https:('sitecollection')/sites/'name'/_api/Web/lists/getByTitle('mytitle')/roleassignments?$expand=Member/Users.RoleDefinitionBindings

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,816 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,705 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-08-11T01:44:38.517+00:00

    Hi @svbianca5280 ,

    To retrieve permissions for sharepoint site, you need to have full control permissions on this site. Ask your site collection administrators to give your full control permissions.

    The permission page url is : /_layouts/15/user.aspx

    122099-image.png


    If an Answer 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.


0 additional answers

Sort by: Most helpful