az ad app credential reset should result same format than az ad app credential list
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 64
Description
**Related command**
az ad app credential reset
**The issue**
Current implementation of `az ad app credential reset` drops some of the data that is returned by the MS Graph endpoint
Command output:
```JSON
{
"appId": "xxxx-84e4c88e4a08",
"password": "yyyyyLMFQT2dt7",
"tenant": "cccccccc8236f"
}
```
Endpoint payload:
```JSON
{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.passwordCredential",
"customKeyIdentifier":null,
"displayName":"uhassagyasygasasgy",
"endDateTime":"2027-10-22T12:10:18Z",
"hint":"xxx",
"keyId":"xxxx-a7c6-fe8b991543a4",
"secretText":"xxxxxT2dt7",
"startDateTime":"2025-10-22T12:10:18Z"
}
```
Output of the list command
```JSON
[
{
"customKeyIdentifier": null,
"displayName": "uhassagyasygasasgy",
"endDateTime": "2027-10-22T12:10:18Z",
"hint": "xxx",
"keyId": "xxxx-b2f4-45a4-a7c6-fe8b991543a4",
"secretText": null,
"startDateTime": "2025-10-22T12:10:18Z"
}
]
```
**Describe the solution you'd like**
The Command should return data in same format than az ad app credential list to make scripting easier.
There is comment about return value format on `_reset_credential`. On potential solution could be making a new format optional by adding control flag for output generation
**Describe alternatives you've considered**
* Calling Graph API directly.
* Not outputting exact enddate and keyId as scripting return values
**Additional context**
https://github.com/Azure/azure-cli/blob/ecf19d1601a5761eec13b377443654b786155ffb/src/azure-cli/azure/cli/command_modules/role/custom.py#L1745-L1751
Contributor guide
Assessment
This issue has not been assessed yet.