We have a massive Azure AD and we want to present its graph using the Microsoft Graph API.
Calling https://graph.microsoft.com/v1.0/groups will bring the first page (100) of all groups and iterating over all the pages takes time. However, we only care about the root group (parentless).
Is there any way to get the root\parentless groups from the Graph API without iterating over all the groups and check for (the absence of) parents?
According to some test, I'm afraid there is no filter which may help you implement this requirement. Graph api can just do as you mentioned to list all of the groups.