Missing description parameter on New-AzureRmAdAppCredential cmdlet
Hi.
I am creating password credentials on an existing SPN, and any credentials that are created using the New-AzureRmAdAppCredential are created using a description of 'Key Description'. It would be useful to have a -description swithc to at least populate this.
Cheers
Shaun
@darshanhs90 Can you take a look at this?
@darshanhs90 do you know if this is information we can send to the server? Right now, the PasswordCredentialsUpdateParameters object that we send (and the corresponding PasswordCredential object it contains) does not contain a property for Description.
Hi, I'm not sure I understand where the Description field comes from, and what command you're trying to populate a description for.
This is an issue in the Az module's New-AzADAppCredential too.
When listing keys in the Azure Portal, there is a Description column. This can be set when creating a key from the Azure Portal or from the AzureAD PowerShell module.

The AzureAD PowerShell Module has the CustomKeyIdentifier option to set the description, but unfortunately the AzureAD module isn't cross platform.
PS C:\> New-AzureADApplicationPasswordCredential -ObjectId "********-****-****-****-************" -CustomKeyIdentifier "My Key Desc" -Value "Password123"
CustomKeyIdentifier : {77, 121, 32, 75...}
EndDate : 18/03/2020 11:56:31 AM
KeyId :
StartDate : 18/03/2019 11:56:31 AM
Value : Password123
The az CLI has limited support for the description field - only when updating a credential. It doesn't seem to support creating a credential after application creation.
Looks like customKeyIdentifier is a field in the beta Microsoft Graph API (application support doesn't exist in 1.0). It also exists in the old Azure AD Graph API. It's a binary field, but displays as text in the Azure portal.
Edit: There's possibly some additional complexity here. The GA and preview experiences of App Registrations have slightly different behaviour. You can see the key I created in my previous comment, and one created through the preview Portal - the GA portal doesn't show the correct description, and PowerShell doesn't see a custom identifier.
GA:

Preview:

AzureAD PowerShell:
PS C:\> Get-AzureADApplicationPasswordCredential -ObjectId $app.ObjectId
CustomKeyIdentifier : {77, 121, 32, 75...}
EndDate : 18/03/2020 12:56:31 AM
KeyId : ********-****-****-****-************
StartDate : 18/03/2019 12:56:31 AM
Value :
CustomKeyIdentifier :
EndDate : 1/03/2020 3:19:45 AM
KeyId : ********-****-****-****-************
StartDate : 1/03/2019 3:19:52 AM
Value :
I believe this issue will be resolved at the same time as this issue. I'm going to close this issue in favor of the one linked previously and we will track the necessary work and status there. Please let me know if this isn't the case and I will re-open this issue.