az account

Manage Azure subscription information.

Commands

az account clear Clear all subscriptions from the CLI's local cache.
az account get-access-token Get a token for utlilities to access Azure.
az account list Get a list of subscriptions for the logged in account.
az account list-locations List supported regions for the current subscription.
az account lock Manage Azure subscription level locks.
az account lock create Create a subscription lock.
az account lock delete Delete a subscription lock.
az account lock list List lock information in the subscription.
az account lock show Show the details of a subscription lock.
az account lock update Update a subscription lock.
az account set Set a subscription to be the current active subscription.
az account show Get the details of a subscription.

az account clear

Clear all subscriptions from the CLI's local cache.

To clear the current subscription, use 'az logout'.

az account clear

az account get-access-token

Get a token for utlilities to access Azure.

The token will be valid for at least 5 minutes with the maximum at 60 minutes. If the subscription argument isn't specified, the current account is used.

az account get-access-token [--resource]
[--subscription]

Optional Parameters

--resource

Azure resource endpoints. Default to Azure Resource Manager Use 'az cloud show' command for other Azure resources.

--subscription -s

Name or ID of subscription.

az account list

Get a list of subscriptions for the logged in account.

az account list [--all]
[--refresh]

Optional Parameters

--all

List all subscriptions, rather just 'Enabled' ones.

--refresh

Retrieve up to date subscriptions from server.

az account list-locations

List supported regions for the current subscription.

az account list-locations

az account set

Set a subscription to be the current active subscription.

az account set --subscription

Required Parameters

--subscription -s

Name or ID of subscription.

az account show

Get the details of a subscription.

If the subscription isn't specified, shows the details of the default subscription.

az account show [--sdk-auth]
[--subscription]

Optional Parameters

--sdk-auth

Output result in compatible with Azure SDK auth file.

--subscription -s

Name or ID of subscription.