Share via

Microsoft Graph API for Sharepoint groups or users

Jain Harshita 20 Reputation points
2026-05-14T09:38:49.7366667+00:00

I am working on Microsort Graph APIs for getting permission for sharepoint sites, drive and drive items usingapplication. For API drives/{driveId}/items/{itemId}/permissions to get permission on drive items, I see that it returns grantedToV2 object with siteUser displayname "Everyone except external users". Similiarly there are other sharepoint group object returned in the format:

"siteGroup": {

                "displayName": "",

                "id": "",

                "loginName": ""

            }

I understand these are Sharepoint groups but is it possible to get details of these groups by Microsoft Graph APIs Or reverse of this ie given a user, by using Microsoft Graph API is it possible to know which site it has permission to?

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

Answer accepted by question author

Gabriel-N 17,785 Reputation points Microsoft External Staff Moderator
2026-05-14T11:33:49.57+00:00

Hello Jain Harshita

Based on my research, here are some clarifications that may help answer your questions.

When a Microsoft Graph API call such asGET /drives/{driveId}/items/{itemId}/permissionsreturns a grantedToV2 object containing a siteGroup (or siteUser like “Everyone except external users”), this represents a classic SharePoint site-level group or built-in principal, not an Azure AD / Microsoft 365 group.

  • “Everyone except external users” is a special built-in SharePoint principal.
  • Other entries (Site Owners, Site Members, Site Visitors, or custom groups) are SharePoint-specific permission groups that exist only inside that site collection.

These are not Entra ID groups, so the id you see in grantedToV2.siteGroup is a SharePoint Principal ID (local to the site). It cannot be used with Graph endpoints like /groups/{id}/members.

At this time, Microsoft Graph haven't provided APIs to retrieve details or membership of these classic SharePoint site groups. Graph’s group APIs only work with Azure AD / Microsoft 365 groups. If you need to retrieve the members of a SharePoint site group (for example, to see who is in “Site Members” or “Everyone except external users”), use the SharePoint REST API (you can call it with the exact same access token you already use for Microsoft Graph, provided you have Sites.Read.All or higher).

For example (replace {tenant}.sharepoint.com/sites/{site-relative-path} with your site URL):

  • List all groups on the siteGET https://{tenant}.sharepoint.com/sites/{site}/_api/web/sitegroups
  • Get members of a specific group (using the name or the id from siteGroup.id):

GET https://{tenant}.sharepoint.com/sites/{site}/_api/web/sitegroups/getbyname('Site Members')/usersor

GET https://{tenant}.sharepoint.com/sites/{site}/_api/web/sitegroups({principalId})/users

Similarly, reverse lookup scenarios are not directly supported in Microsoft Graph. There is no single Graph API that can answer “which SharePoint sites, drives, or items does user X have access to.”

  • In a delegated (user) context, security trimming happens automatically (e.g., when the user searches or queries content).
  • In an application-only context (your scenario), you generally need to enumerate sites and check permissions individually, which does not scale well.

As alternatives, some customers rely on Microsoft Search (security-trimmed queries) or audit logs to indirectly understand user access.

I hope this helps clarify the current behavior and limitations of Microsoft Graph with SharePoint permissions.


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.   

Was this answer helpful?

2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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