An Azure service that provides a hybrid, multi-cloud management platform for APIs.
To fetch the list of owners for multiple groups in a more efficient manner, you can utilize the Microsoft Graph API's batch request feature. However, as you noted, there is a limitation of 20 requests per batch. This means that if you have more than 20 groups, you will need to send multiple batch requests.
Currently, there is no single endpoint that allows you to fetch the owners of multiple groups in one call. You will need to use the following endpoint for each group to list its owners:
GET /groups/{id}/owners
To optimize performance, you can implement a batching mechanism in your application to group the requests into batches of 20. This way, you can minimize the number of round trips to the server while still adhering to the API's limitations.
Additionally, if you are frequently needing to access group owners, consider caching the results to reduce the number of API calls made during subsequent requests.
References: