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 utilities 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 management-group |
Manage Azure Management Groups. |
az account management-group create |
Create a new management group. |
az account management-group delete |
Delete an existing management group. |
az account management-group list |
List all management groups. |
az account management-group show |
Get a specific management group. |
az account management-group subscription |
Subscription operations for Management Groups. |
az account management-group subscription add |
Add a subscription to a management group. |
az account management-group subscription remove |
Remove an existing subscription from a management group. |
az account management-group update |
Update an existing management group. |
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
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account get-access-token
Get a token for utilities 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]
[--resource-type {aad-graph, arm, batch, data-lake, media, ms-graph, oss-rdbms}]
[--subscription]
[--tenant]
Examples
Get an access token for the current account
az account get-access-token
Get an access token for a specific subscription
az account get-access-token --subscription 00000000-0000-0000-0000-000000000000
Get an access token for a specific tenant
az account get-access-token --tenant 00000000-0000-0000-0000-000000000000
Get an access token to use with MS Graph API
az account get-access-token --resource-type ms-graph
Optional Parameters
Azure resource endpoints. Default to Azure Resource Manager.
Type of well-known resource.
Name or ID of subscription.
Tenant ID for which the token is acquired. Only available for user and service principal account, not for MSI or Cloud Shell account.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account list
Get a list of subscriptions for the logged in account.
az account list [--all]
[--query-examples]
[--refresh]
Optional Parameters
List all subscriptions, rather than just 'Enabled' ones.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Retrieve up-to-date subscriptions from server.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account list-locations
List supported regions for the current subscription.
az account list-locations
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account set
Set a subscription to be the current active subscription.
az account set --subscription
Required Parameters
Name or ID of subscription.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
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 [--query-examples]
[--sdk-auth]
[--subscription]
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Output result to a file compatible with Azure SDK auth. Only applicable when authenticating with a Service Principal.
Name or ID of subscription.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.