How to retrieve the SharePoint group IDs of the current user using Graph API

Patidar, Jaydeep 20 Reputation points

What's the best way to retrieve the IDs of SharePoint groups in which the current user is a member using Graph API?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,337 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,222 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 43,836 Reputation points Microsoft Vendor

    Per my research, there is no dedicated endpoint in Microsoft Graph to get SharePoint Group permissions and their members currently.

    You only could get the id of Microsoft 365 groups in which the current user is a member.

    Here are steps:

    1.Get the user id by using following graph query.$filter=displayName eq 'DisplayName'

    2.Get the Microsoft 365 group display name and id by using following graph query.{userid}/memberOf/$select=displayName,id


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.