How to get sharepoint site group name using Graph API?

Dnyaneshwar Surywanshi 41 Reputation points
2020-10-22T11:59:42.39+00:00

34286-sitegroups.png

I want to get all group name using graph API ?

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

Accepted answer
  1. Baker Kong-MSFT 3,801 Reputation points
    2020-10-23T02:08:37.523+00:00

    Hi @Dnyaneshwar Surywanshi ,

    By default, MS Graph API has not exposed such endpoints to access SharePoint site groups. But you can consider using below alternative method:

    There is a hidden list "User Information List" that stores users (including groups) information. We can get group name through this list.

    34389-1.jpg

    The endpoint is:

    https://graph.microsoft.com/v1.0/sites/{siteid}/lists/User Information List/items?expand=fields  
    

    Reference doc:

    Best Regards,
    Baker Kong


    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.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sharath Kumar Aluri 3,071 Reputation points
    2020-10-22T14:44:43.913+00:00

    As of now, it does not appear that you can get SharePoint Groups using Graph API. Post your comment in user invoice.

    https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/35989975-get-sharepoint-security-groups-members-using-micro

    You can use Rest API to get all SharePoint Groups in the Site, below is the example:

    var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups

    Thanks & Regards,

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.