| author | kenieva |
|---|---|
| ms.service | resource-graph |
| ms.topic | include |
| ms.date | 06/20/2025 |
| ms.author | kenieva |
Outputs a list of Service Groups.
resourcecontainers
| where type == "microsoft.management/servicegroups"az graph query -q "resourcecontainers | where type == 'microsoft.management/servicegroups'"
Search-AzGraph -Query "resourcecontainers | where type == 'microsoft.management/servicegroups'" -UseTenantScope
- Azure portal: portal.azure.com
Outputs a list of resource IDs that are members for a particular Service Groups. In this example, the service group ID is '123'.
relationshipresources
| where type == "microsoft.relationships/servicegroupmember"
| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123'
| project properties.SourceIdaz graph query -q "relationshipresources| where type == 'microsoft.relationships/servicegroupmember'| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123' | project properties.SourceId"
Search-AzGraph -Query "relationshipresources| where type == 'microsoft.relationships/servicegroupmember'| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123' | project properties.SourceId" -UseTenantScope
- Azure portal: portal.azure.com
Provides a count of service group members for a particular service group. In this example, the service group ID is '123'.
relationshipresources
| where type == "microsoft.relationships/servicegroupmember"
| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123'
| count az graph query -q "relationshipresources| where type == 'microsoft.relationships/servicegroupmember'| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123' | count"
Search-AzGraph -Query "relationshipresources| where type == 'microsoft.relationships/servicegroupmember'| where properties.TargetId == '/providers/Microsoft.Management/serviceGroups/123' | count" -UseTenantScope
- Azure portal: portal.azure.com