Azure / Azure/azure-cli

Service principal is missing in `az ad group owner list` after upgrade to 2.37

Open
#23,951 7 comments 5 reactions 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad Auto-Assign Azure CLI Team customer-reported Graph question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az ad group owner list`

**Errors:**
Missing service principal as owner after upgrade to azcli 2.37+
```
$ az ad group owner list --group c40d6c92-ebf1-46ee-9fd1-99685b281394 --out tsv --query '[].[mail,id]'
user1@company.com 7addc286-717c-4590-9ec9-4559d41725f9
user2@company.com c2ddd1d1-8ae8-42e6-aef4-2d7dd44bce65
user3@company.com 07930e5c-a4fd-4365-a817-1fb436d7c5c3
user4@company.com aa62e803-6966-4dff-b7f0-0772bf76b0c9
user5@company.com df2f9469-acc3-4bf9-993e-dfa6872903fe
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- Authenticate to azure subscription
- install azcli 2.37 or higher (includes Microsoft Graph API migration)
- `az ad group owner list --group ExampleGroup`

## Expected Behavior
Service principal is display as owner before 2.37
```
$ az ad group owner list --group c40d6c92-ebf1-46ee-9fd1-99685b281394 --out tsv --query '[].[mail,objectId]'
user1@company.com 7addc286-717c-4590-9ec9-4559d41725f9
user2@company.com c2ddd1d1-8ae8-42e6-aef4-2d7dd44bce65
user3@company.com 07930e5c-a4fd-4365-a817-1fb436d7c5c3
user4@company.com aa62e803-6966-4dff-b7f0-0772bf76b0c9
user5@company.com df2f9469-acc3-4bf9-993e-dfa6872903fe
None 1d0bb3be-f638-4b53-ac11-4ddd39e0d990

$ az version
{
"azure-cli": "2.32.0",
"azure-cli-core": "2.32.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"account": "0.2.2",
"alertsmanagement": "0.2.2",
"log-analytics": "0.2.2",
"monitor-control-service": "0.3.0",
"resource-graph": "2.1.0",
"scheduled-query": "0.5.0"
}
}
```

## Environment Summary
```
Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.29, Ubuntu 20.04.4 LTS
Python 3.8.10
Installer: PIP

azure-cli 2.40.0

Extensions:
account 0.2.3
alertsmanagement 0.2.2
log-analytics 0.2.2
monitor-control-service 0.3.0
resource-graph 2.1.0
scheduled-query 0.5.1

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context
![image](https://user-images.githubusercontent.com/16313165/191279649-e555df91-20fd-4804-beca-3df9d36b6ab6.png)
Group owners as display in azure portal

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.