You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
az ad group member list does not list service principals #22664
We've discovered that if we log into azure cloud shell (azure-cli v2.48.1) as the service principal behind our Azure DevOps service connection, we can't use az cli to add, list, or check group members of a security group, even though our service principal owns the group. (Yields Insufficient privileges to complete the operation.)
We've also discovered that if we add a managed identity to said group manually, the managed identity isn't listed as a group member by az ad group list --group '...' (no matter who you run as)
#!/bin/bash# running as the service principal behind an ADO service connection
principal="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"# where $principal is a system managed identity from a linux web app
group="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"# where $group is an AAD security group with nobody in it owned by a service principalecho"##[command]az ad group member check --group \"$group\" --member-id \"$principal\""
is_member=$(az ad group member check --group "$group" --member-id "$principal"| jq -r '.value')if [ "$is_member"="false" ];thenecho"##[command]az ad group member add --group \"$group\" --member-id \"$principal\""
az ad group member add --group "$group" --member-id "$principal"elseecho"##[warning]principal \"$principal\" is already a member of group \"$group\""fiecho"##[command]az ad group member list --group \"$group\""
az ad group member list --group "$group"
do you ever wonder what the environmental impact is of
bot notes stale issue
bot emails everyone
someone turns up to poke the issue
I do. I bet it's non-negligible.
Not a fraction of the cost of
Non microsoft people detect the bug, and document the bug
Microsoft ignores the bug
More customers notice the bug and document the bug, surprised that it really is not corrected yet
Real human people beg Microsoft to fix their bug or explain a workaround or add a new API, or add a command line program with just one purpose, to work around the microsoft bug. Or at least update the documentation to explain that the api is broken, but they can't afford to hire a programmer to implement it.
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
Activity
yonzhan commentedon May 30, 2022
Jiashuo Li (@jiasli) for awareness
jiasli commentedon May 30, 2022
Please also see #16123 (comment)
According to List members API's documentation:
https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
This is a feature gap between AD Graph and Microsoft Graph.
As a workaround, you may use
az restto call beta API: https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-beta&tabs=httpncook-hxgn commentedon Jun 29, 2023
bump
We've discovered that if we log into azure cloud shell (azure-cli v2.48.1) as the service principal behind our Azure DevOps service connection, we can't use az cli to
add,list, orcheckgroup members of a security group, even though our service principal owns the group. (YieldsInsufficient privileges to complete the operation.)We've also discovered that if we add a managed identity to said group manually, the managed identity isn't listed as a group member by
az ad group list --group '...'(no matter who you run as)30 remaining items
uffehellum-boeing commentedon Apr 15, 2026
The bug is still present, four years after being explained to Microsoft.
Please correct the error. Yes, this defect actually matters for customers who use something called "computers".
uffehellum-boeing commentedon Apr 15, 2026
Not a fraction of the cost of
pierrejeandev commentedon May 22, 2026
Hi, I still have the issue with the lastest az cli.
FlorentATo commentedon May 22, 2026
Well, 4 years (minus 1 week) later, is there a chance we see the beta endpoint go GA anytime soon Jiashuo Li (@jiasli) ?
az ad group owner listafter upgrade to 2.37 #23951 as a duplicate of this issuemicrosoft-github-policy-service commentedon Sep 24, 2026
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
FlorentATo commentedon Sep 26, 2026
Well, we haven't heard back from Microsoft in years on this issue...
microsoft-github-policy-service commentedon Oct 4, 2026
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!