az ad sp credential

Manage a service principal's credentials.

The credential update will be applied on the Application object the service principal is associated with. In other words, you can accomplish the same thing using "az ad app credential".

Commands

az ad sp credential delete Delete a service principal's credential.
az ad sp credential list List a service principal's credentials.
az ad sp credential reset Reset a service principal credential.

az ad sp credential delete

Delete a service principal's credential.

az ad sp credential delete --id
--key-id
[--cert]
[--subscription]

Required Parameters

--id

Service principal name, or object id.

--key-id

Credential key id.

Optional Parameters

--cert

A certificate based credential.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ad sp credential list

List a service principal's credentials.

az ad sp credential list --id
[--cert]
[--subscription]

Required Parameters

--id

Service principal name, or object id.

Optional Parameters

--cert

A certificate based credential.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az ad sp credential reset

Reset a service principal credential.

az ad sp credential reset --name
[--append]
[--cert]
[--create-cert]
[--credential-description]
[--end-date]
[--keyvault]
[--password]
[--subscription]
[--years]

Required Parameters

--name -n

Name or app ID of the service principal.

Optional Parameters

--append

Append the new credential instead of overwriting.

--cert

Certificate to use for credentials.

--create-cert

Create a self-signed certificate to use for the credential.

--credential-description

The description of the password.

--end-date

Finer grain of expiry time if '--years' is insufficient, e.g. '2020-12-31T11:59:59+00:00' or '2299-12-31'.

--keyvault

Name or ID of a KeyVault to use for creating or retrieving certificates.

--password -p

The password used to log in.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--years

Number of years for which the credentials will be valid. Default: 1 year.