Question

I could get members of Site base on the Group (https://graph.microsoft.com/v1.0/groups/{id}/members). But I could not get the members of Root Site and Communication Site because these sites have not belong to any Group.

Is there any way to get members of the Root Site and Communication Site with Microsoft Graph API?

Était-ce utile?

La solution

The reason you can do it for those team sites is that because they have O365 groups. In your query you're actually hitting the groups endpoint, not something related to SharePoint itself, that's why you're able to get the users who are members of that "group", which is basically users who are members of that team site connected to the group.

However, the communication sites and in your case the Root site, they don't have Office 365 groups connected to them. Graph APIs don't expose endpoints to query permissions for these types of sites at the moment. You'll need to use SharePoint APIs for that purpose.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top