-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az ad group member list returns empty for security groups containing only service principals #33076
Copy link
Copy link
Closed
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adOutputPossible-SolutionSimilar-Issueact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamGraph(doesn't work with label-triggered comments; use Graph.Microsoft instead) az ad(doesn't work with label-triggered comments; use Graph.Microsoft instead) az adOutputPossible-SolutionSimilar-Issueact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
az ad group member listreturns empty results for a security group whose members are service principals (managed identities), while the Azure portal correctly shows the members when logged in with the same identity and tenant.Steps to reproduce
Login to the tenant where the security group exists:
Verify the group exists and is accessible:
List group members:
Open Azure portal (portal.azure.com), switch to the same directory, navigate to the same group → Members tab → shows the correct members (service principals)
Expected behavior
az ad group member listshould return the same members that the Azure portal shows.Actual behavior
The CLI returns empty results while the portal shows members correctly. Both use the same user identity and the same tenant.
Additional context
az ad group showworks correctly for this groupaz ad group member listEnvironment