An API that connects multiple Microsoft services, enabling data access and automation across platforms
Recommended approach to return only groups owned by an user
According to Azure graph documentation: https://learn.microsoft.com/en-us/graph/api/user-list-ownedobjects?view=graph-rest-1.0&tabs=http the endpoint ownedObjects gets the list of all directory objects that are owned by the user.
I would like to know what is the recommended approach to only get the owned Groups of an user and exclude other types of directory objects. I tried using the endpoint https://graph.microsoft.com/v1.0/users/{user-id}/ownedObjects/microsoft.graph.groups but I did not find any reference to this in the official documentation so I am not sure if this approach is recommended specially in cases in which we also want to use OData Query Parameters (to increase the default page size).
Likewise, I would also like to know the recommended way to get only all groups a user is a transitive member of, because the documentation says the endpoint returns not only groups but also directory roles and administrative units: https://learn.microsoft.com/en-us/graph/api/user-list-transitivememberof?view=graph-rest-1.0&tabs=http
Thank you in advance.
Best regards,
Joana Pedroso