Subscriptions - az account

Manage subscriptions.

Commands

az account clear Clear all subscriptions from the CLI's local cache.
az account get-access-token Get AAD token to access to a specified resource.
az account list Get a list of subscriptions for the account.
az account list-locations List supported regions of the current subscription.
az account set Set a subscription as the current subscription.
az account show Show the details of a subscription.

az account clear

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

az account clear

az account get-access-token

Provides the token for trusted utils to access your Azure subscriptions. 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 account.

az account list [--all]

Optional Parameters

--all

List all subscriptions, rather just 'Enabled' ones.

az account list-locations

List supported regions of the current subscription.

az account list-locations

az account set

Set a subscription as the current subscription.

az account set --subscription

Required Parameters

--subscription -s

Name or ID of subscription.

az account show

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

az account show [--subscription]

Optional Parameters

--subscription -s

Name or ID of subscription.