How to get all members of a site

%3CLINGO-SUB%20id%3D%22lingo-sub-1840657%22%20slang%3D%22en-US%22%3EHow%20to%20get%20all%20members%20for%20a%20site%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1840657%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20see%20if%20there's%20a%20way%20to%20get%20all%20members%20of%20a%20root%20site%20using%20the%20graph%20api%20or%20otherwise.%20I%20see%20there's%20a%20way%20to%20get%20the%20root%20site%20for%20a%20group%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fsite-get%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fsite-get%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%3C%2FA%3E.%20However%2C%20I%20am%20looking%20for%20some%20way%20to%20list%20all%20the%20sites%20and%20all%20the%20members%20for%20them.%20So%20essentially%20I%20can%20list%20the%20sites%20using%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fsites%3Fsearch%3D*%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fsites%3Fsearch%3D*%3C%2FA%3E%26nbsp%3Bbut%20that%20still%20doesn't%20tell%20which%20ones%20are%20associated%20with%20groups.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Visitor

Hi,

 

I'm trying to see if there's a way to get all members of a root site using the graph api or otherwise. I see there's a way to get the root site for a group https://docs.microsoft.com/en-us/graph/api/site-get?view=graph-rest-1.0&tabs=http. However, I am looking for some way to list all the sites and all the members for them. So essentially I can list the sites using https://graph.microsoft.com/v1.0/sites?search=* but that still doesn't tell which ones are associated with groups.

 

Thanks!

1 Reply

@sharvanath I do not know if this is possible through MS Graph. Perhaps you could try it out through PowerShell?