1

Is there any endpoint in the Microsoft Graph API fore SharePoint Online to list all the groups and members of SharePoint groups? It must also be possible to manage the users from those groups.

As alternative there's an endpoint using https://{mytenant}.sharepoint.com/site/{mysite}/_api/web/SiteGroups but for this, it seems not usable with an access token from https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token. To the app registration in Azure, the application permissions for User.Read.All and User.ReadWrite.All with the SharePoint API are added, without success.

2 Answers 2

2

There is no dedicated endpoint in Microsoft Graph to get SharePoint Group permissions or their members.

If you want to get the list of all users & groups in SharePoint site, you can query "User Information List" like:

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

Check below links for more information:

  1. How to get sharepoint site group name using Graph API?
  2. Get SharePoint Groups (not AD groups) using Graph API

However, I don't think it is possible to manage the group membership / users using Microsoft Graph.

0

However it's not possible to get users from SharePoint groups, it's possible to get users from Azure AD groups and that can be added into a SharePoint groep.

With this work around user management with the Graph API is a lot easier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.