2

What is the "Secret ID" in the "Certificates & secrets" blade of Azure AD App registration and how can we use this?

I have checked MS docs but there is no direct explanation.

Ryan H.
  • 2,543
  • 1
  • 15
  • 24
  • My understanding is that this is an identifier that Microsoft is using to distinguish between secrets belonging to an app registration. However, I do not have any documentation to support this. – Ryan H. Mar 16 '23 at 08:05
  • In terms of *using* a client secret have you looked at this documentation: https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#add-a-client-secret – Ryan H. Mar 16 '23 at 08:07
  • yes I checked the link and I could not find any specific definition to figure this out – chandra shekhar Mar 17 '23 at 09:48
  • secret_id - The ID of the associated Key Vault Secret- i found in terraform registry – chandra shekhar Jun 16 '23 at 08:50

1 Answers1

0

Microsoft defines the Secret ID as:

KeyId : The unique identifier for the password.

Source:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.powershell.cmdlets.resources.msgraph.models.apiv10.imicrosoftgraphpasswordcredential?view=az-ps-latest#properties

Purpose:

This is used in commands that target a specific client secret. For example: say you want to delete a client secret:

PS C:\> $AppID = (Get-AzureADApplication -Top 1).objectId
PS C:\> $KeyIDs = Get-AzureADApplicationPasswordCredential -ObjectId $AppId
PS C:\> Remove-AzureADApplicationPasswordCredential -ObjectId $AppId -KeyId $KeyIds[0].KeyId

For more examples:

https://learn.microsoft.com/en-us/powershell/module/azuread/remove-azureadapplicationpasswordcredential?view=azureadps-2.0#example-1-remove-an-application-password-credential

As an aside: Since the documentation is often difficult to find, what I often do is just look for a powershell command that interacts with the object I'm interested in, look for the return type, open that up and view its properties and match them up to the UI based on the values returned.

Pat
  • 2,540
  • 1
  • 21
  • 28