Microsfot Graph Groups API expand sites not working

Clifton Sammut 26 Reputation points
2021-02-24T10:11:50.343+00:00

Hi, I am trying to do a call to get all the sites and the groups and link Sites that have a group using graph.

So I Did the following call

https://graph.microsoft.com/v1.0/groups?$expand=sites($select=id)&$select=id,displayName,mail,mailEnabled,createdDateTime

it return the groups list by the sites never gets expanded but if I do expand=members it works.

I am doing something wrong in the select/expand query or there is a bug in the api?
Is this the best way to link a group with a site?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,478 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,261 Reputation points Microsoft Employee
    2021-02-27T11:45:51.237+00:00

    I tried the above API call (with $expand=sites) and it returns the following values; adding the snapshot.

    72672-image.png