How to get the Sharepoint Permission Groups using Graph API ?

Demo Demo 20 Reputation points
2023-07-29T05:06:04.6466667+00:00

I have tried using the endpoint "https://grpah.microsoft.com/sites/{site_id}/permissions" return a null value attribute. Is there any other way to get the site's permission group that are available in the site permission setting.

Using the "user Information list" it also returns the permission groups of the subsites. I'm need the permission of the corresponding site only.

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

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-08-01T06:18:20.13+00:00

    Hi @Demo Demo,

    Per my research, Graph api doesn't support SharePoint groups yet. Here is a similar issue with yours, please make a reference.

    https://sharepoint.stackexchange.com/questions/293496/how-to-get-the-users-groups-for-sharepoint-online-site-usig-microsoft-graph-a

    As a workaround, I will recommend you to use rest api to get all groups in the site. We can uese following api

    https://{sitecollection}/_api/web/sitegroups
    

    Also I noticed that some end users have also proposed the same request, it is highly recommended that you can vote this ticket. Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.


    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.

    1 person found this answer helpful.

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.