Hi @Anonymous
There isn't a direct API to list all active entities from the Management Group. However, by utilizing optional parameters, we can achieve the desired outcome. To list the active entities that descend from a Management Group, you can use the following alternative custom API:
To view entities based on specific permissions they possess:
POST
https://management.azure.com/providers/Microsoft.Management/getEntities?api-version=2020-05-01&$skiptoken={$skiptoken}&$skip={$skip}&$top={$top}&$view={$view}&groupName={groupName}
Using the filter parameter to view active entities:
POST
https://management.azure.com/providers/Microsoft.Management/getEntities?api-version=2020-05-01&$skiptoken={$skiptoken}&$skip={$skip}&$top={$top}&$filter={statuseq'Active'}&groupName={groupName}
Reference :
Entities - List - REST API (Azure Management Groups) | Microsoft Learn
Management Groups - Get Descendants - REST API (Azure Management Groups) | Microsoft Learn
If you are looking for the Management Group Descendants, you can use the following API:
GET https://management.azure.com/providers/Microsoft.Management/managementGroups/{groupId}/descendants?api-version=2020-05-01&$skiptoken={$skiptoken}&$top={$top}
If you have any further queries, do let us know.
Please do not forget to "Accept the answer” and upvote it wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.