az account
发布时间:2026-09-20 | 浏览:1
Access to this page requires authorization. You can try signing in or changing directories .
Access to this page requires authorization. You can try changing directories .
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Manage Azure subscription information.
Accept subscription ownership status.
Manage subscription alias.
Create Alias Subscription.
List Alias Subscriptions.
Get Alias Subscription.
Place the CLI in a waiting state until a condition of the account alias is met.
Clear all subscriptions from the CLI's local cache.
Create a subscription.
Get a token for utilities to access Azure.
Get a list of subscriptions for the logged in account. By default, only 'Enabled' subscriptions from the current cloud is shown.
List supported regions for the current subscription.
Manage Azure subscription level locks.
Create a subscription lock.
Delete a subscription lock.
List lock information in the subscription.
Show the details of a subscription lock.
Update a subscription lock.
Manage Azure Management Groups.
Check if a Management Group Name is Valid.
Create a new management group.
Delete an existing management group.
Entity operations (Management Group and Subscriptions) for Management Groups.
List all entities for the authenticated user.
Provide operations for hierarchy settings defined at the management group level. Settings can only be set on the root Management Group of the hierarchy.
Create hierarchy settings defined at the Management Group level.
Delete the hierarchy settings defined at the Management Group level.
Get all the hierarchy settings defined at the Management Group level.
Update the hierarchy settings defined at the Management Group level.
List all management groups in the current tenant.
Get the details of the management group.
Subscription operations for Management Groups.
Add a subscription to a management group.
Remove an existing subscription from a management group.
Show the details of a subscription under a known management group.
Get the subscription under a management group.
Backfill Tenant Subscription Operations for Management Groups.
Get the backfill status for a tenant.
Start backfilling subscriptions for a tenant.
Update an existing management group.
Set a subscription to be the current active subscription.
Get the details of a subscription.
Manage subscriptions.
Cancel subscription.
Enable subscription.
Get all subscriptions for a tenant.
This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
Rename subscription.
Get details about a specified subscription.
Get the tenants for your account.
az account accept-ownership-status
Accept subscription ownership status.
Required Parameters
Subscription Id. Required.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account clear
Clear all subscriptions from the CLI's local cache.
To clear the current subscription, use 'az logout'.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az account create
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a subscription.
Required Parameters
The name of the enrollment account to which the subscription will be billed.
The offer type of the subscription. For example, MS-AZR-0017P(EnterpriseAgreement) and MS-AZR-0148P(EnterpriseAgreement devTest) are available. Allowed values: MS-AZR-0017P, MS-AZR-0148P, MS-AZR-USGOV-0015P, MS-AZR-USGOV-0017P, MS-AZR-USGOV-0148P.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
The display name of the subscription.
Do not wait for the long-running operation to finish.
The object id(s) of the owner(s) which should be granted access to the new subscription.
The service principal name(s) of the owner(s) which should be granted access to the new subscription.
The user principal name(s) of owner(s) who should be granted access to the new subscription.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
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.
In the output, expires_on represents a POSIX timestamp and expiresOn represents a local datetime. It is recommended for downstream applications to use expires_on because it is in UTC.
Get an access token for the current account
Get an access token for a specific subscription
Get an access token for a specific tenant
Get an access token to use with MS Graph API
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
Name or ID of subscription.
Azure resource endpoints in Microsoft Entra v1.0.
Type of well-known resource.
Space-separated scopes in Microsoft Entra v2.0. Default to Azure Resource Manager.
Tenant ID for which the token is acquired. Only available for user and service principal account, not for managed identity or Cloud Shell account.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
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. By default, only 'Enabled' subscriptions from the current cloud is shown.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
List all subscriptions from all clouds, including subscriptions that are not 'Enabled'.
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.
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.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
Whether to include extended locations.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Set a subscription to be the current active subscription.
Required Parameters
Name or ID of subscription.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
The related change reference ID for this resource operation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
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.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name or ID of subscription.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?