In the portal, under home > App registrations > Shazoo > Certificates & secrets, I can see a list of 5 different client secrets. When I execute any of the following, I can confirm that both produce a result for the specified GUID that also correlates with the Application ID on the Overview.
az ad sp list --all --query "[?displayName=='Shazoo']" --output table
az ad app list --all --query "[?displayName=='Shazoo']" --output table
Then, I'd like to see (and manage) the secrets shown in the portal. According to docs for service principal and docs for registered applications, I'm supposed to execute the following (replacing the GUID as found in the tables produces above).
az ad app credential list --id 2dda03c9-5d9b-4772-a666-c870a8c933c4
az ad sp credential list --id 2dda03c9-5d9b-4772-a666-c870a8c933c4
The first one results in an array containing a single credential, the key not corresponding to any of the shown in the portal. The second one results in an empty array. It confuses me and I suspect that the crentials accessed this way belong to elsewhere than the view in question. (The same goes for resetting the credential as no new one appears in the list visible in the portal.)
What am I missing and how do I manage my list of secrets from Azure CLI?
There was some confusion in docs in this regard but it seems to have been resolved about a year ago. I've seen a similar question but it doesn't discuss listing (and, also, I noticed that it didn't produced the requested result for some reason). I also see the commands suggested under Credentials creation with a client secret inthis blog but with no screenshots form the portal to verify.