azure-cli
azure-cli copied to clipboard
az ad app credential list --id xxxxx - not listing 'certificate' type details
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
I am trying to get credentials list of my APP using **az ad app credential list --id
To Reproduce Create AD SP Upload certificate to SPN and execute
az ad app credential list --id <applicaitonid>
az ad sp credential list --id <applicaitonid>
Expected behavior
it should return all type of credentials belongs to specific applicationid. i am able to get the types (AsymmetricX509Cert,Password) using below commands in pwsh, but really want to use az cli for --show-mine filter :)
Get-AzADApplication -ObjectId "xxxxxx" | Get-AzADAppCredential
Environment summary
azure-cli - 2.0.70 * | mac os 10.14.5 (18F132)
https://github.com/Azure/azure-cli/blob/c935aa431e4871979f1be2e5dd5cf2902eaca319/src/azure-cli/azure/cli/command_modules/role/custom.py#L1143
cert is False by default, so list_password_credentials is called. To get certificates listed, append --cert, so that CLI calls list_key_credentials.
az ad app credential list --id xxxx --cert
Also see: https://docs.microsoft.com/en-us/cli/azure/ad/app/credential?view=azure-cli-latest
yes ! it works . it would be great if "az ad app credential list --id xxxx " returns both type of credentials which is easier to prepare reports rather than writing loops in script. can this be considered as feature request ?
Sure. We will discuss with our PM.
yes ! it works . it would be great if "az ad app credential list --id xxxx " returns both type of credentials which is easier to prepare reports rather than writing loops in script. can this be considered as feature request ?
what would be greater would be adding this information to the documentation.
current verbiage:
--cert
A certificate based credential.
suggested verbiage:
--cert
Show certificate based credentials only. (absence of flag will show password credentials only)
This is updated