Azure / Azure/azure-cli

`az ad group member list` outputs far less information than before the Graph API migration. How to retrieve those additional attributes?

Open
#23,017 7 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad Feature Candidate feature-request Graph
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 issue

We use the outputs of `az ad group member list` to drive other data-backed process within our company. Many of the attributes that used to be available as outputs from this command are longer output.

What is the migration path to access those other pieces of information from the `azcli`?

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

## 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 member list --group ExampleGroup`

```
partial JSON snippet

{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"businessPhones": [
"5555"
],
"displayName": "Name Last",
"givenName": "Name",
"id": "GUID",
"jobTitle": "Some Title",
"mail": "example@example.org",
"mobilePhone": "555-555-5555",
"officeLocation": null,
"preferredLanguage": null,
"surname": "Last",
"userPrincipalName": "example@example.org"
}
```

## Expected Behavior

Prior to 2.37 an example output might look like:
```
partial JSON snippet

{
"accountEnabled": true,
"ageGroup": null,
"assignedLicenses": [
{
"disabledPlans": [],
"skuId": "GUID"
},
...
],
"assignedPlans": [
{
"assignedTimestamp": "2020-05-20T22:06:46Z",
"capabilityStatus": "Enabled",
"service": "ServiceName",
"servicePlanId": "GUID"
}
...
],
"city": null,
"companyName": null,
"consentProvidedForMinor": null,
"country": null,
"createdDateTime": "date",
"creationType": "EmailVerified",
"deletionTimestamp": null,
"department": null,
"dirSyncEnabled": true,
"displayName": "Name Last",
"employeeId": null,
"extension_b8017f7b65834f229dfc5057389a227a_extensionAttribute1": "value",
"extension_b8017f7b65834f229dfc5057389a227a_extensionAttribute2": "date",
"facsimileTelephoneNumber": null,
"givenName": "Nickname",
"immutableId": "NotGuid",
"isCompromised": null,
"jobTitle": "Title",
"lastDirSyncTime": "Date",
"legalAgeGroupClassification": null,
"mail": "example@example.org",
"mailNickname": "example",
"mobile": "555-555-5555",
"objectId": "GUID",
"objectType": "User",
"odata.type": "Microsoft.DirectoryServices.User",
"onPremisesDistinguishedName": "CN/OU information",
"onPremisesSecurityIdentifier": "...",
"otherMails": [
"otherexample@example.org"
],
...
"userPrincipalName": "example@example.org",
"userState": null,
"userStateChangedOn": null,
"userType": "Member"
},
```

## Environment Summary
```
macOS-12.4-x86_64-i386-64bit, Darwin 21.5.0
Python 3.10.4
Installer: HOMEBREW

azure-cli 2.37.0
```

This is also happening on github actions, after upgrading to azure-cli 2.37.0

## Additional Context

Any help would be much appreciated! Thanks in advance!

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.