Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate client secret in azure app registration in Azure AD from CLI?

How can I use AZ commands to create client secret the same way I can do it from the portal? Creating client secret from portal

like image 446
Ahmed Mohamed Avatar asked Aug 30 '19 20:08

Ahmed Mohamed


People also ask

How do you get client ID and client secret for Azure key vault?

Generate the Client IDLogin to the Azure portal. Search for Azure Key Vault. Click +Add to create a new key vault as shown below: After the vault is created, from the left navigation, select the Overview section and make note of the Vault URI AZURE_KEYVAULT_URL.


1 Answers

You are looking for az ad app credential reset, it appends or overwrites an application's password(i.e. client secret) or certificate credentials.

az ad app credential reset --id
                           [--append]
                           [--cert]
                           [--create-cert]
                           [--credential-description]
                           [--end-date]
                           [--keyvault]
                           [--password]
                           [--years]

Sample(you can also specify other parameters, it depends on you):

az ad app credential reset --id xxxxxxxxxxxx --append

enter image description here

like image 124
Joy Wang Avatar answered Oct 07 '22 02:10

Joy Wang