az
AzClips CLI.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az account |
Manage the signed-in account. |
Core | Preview |
| az agent |
Agent internal tools exposed as commands, primarily for integration with external AI tools (Copilot CLI, Claude Code) as skills. |
Core | Preview |
| az config |
Manage local Azure CLI configuration settings and preferences. |
Core | Preview |
| az deployment |
Manage Azure Resource Manager (ARM/Bicep) deployments. |
Core | Preview |
| az disk |
Manage Azure managed disks. |
Core | Preview |
| az extension |
Manage extension packages and discovery-backed extension state. |
Core | Preview |
| az group |
Manage resource groups in your Azure subscription. |
Core | Preview |
| az identity |
Manage Azure user-assigned managed identities. |
Core | Preview |
| az keyvault |
Manage Key Vault data-plane objects. |
Core | Preview |
| az login |
Authenticate to Azure. |
Core | Preview |
| az logout |
Sign out of the active profile. |
Core | Preview |
| az msgraph |
Query Microsoft Entra directory objects through Microsoft Graph. |
Core | Preview |
| az network |
Manage Azure networking resources. |
Core | Preview |
| az profile |
Manage saved Azure authentication profiles. |
Core | Preview |
| az rest |
Send an authenticated HTTP request to Azure Resource Manager. |
Core | Preview |
| az role |
Manage Azure role-based access control (RBAC). |
Core | Preview |
| az storage |
Manage Azure Storage accounts and resources. |
Core | Preview |
| az survey |
Open the feedback form in the default System Browser to provide feedback about Azure CLI. |
Core | Preview |
| az troubleshoot |
Recover from saved command failures with AI. |
Core | Preview |
| az vm |
Manage Azure virtual machines. |
Core | Preview |
az login
Authenticate to Azure.
Authenticate to Azure and persist account context for subsequent commands.
az login [--client-id]
[--client-secret]
[--federated-token]
[--identity]
[--object-id]
[--out-profile]
[--profile]
[--resource-id]
[--service-principal]
[--subscription-id]
[--tenant-id]
[--use-device-code]
Examples
Login with subscription id
az login --subscription-id 00000000-0000-0000-0000-000000000000
Create a named profile and make it active
az login --subscription-id 00000000-0000-0000-0000-000000000000 --tenant-id 00000000-0000-0000-0000-000000000000 --out-profile dev
Switch to a saved profile for subsequent commands
az login --subscription-id 00000000-0000-0000-0000-000000000000 --tenant-id 00000000-0000-0000-0000-000000000000 --out-profile dev
az profile set --name prod
az group list
Use a saved profile for one command without changing the active profile
az login --subscription-id 00000000-0000-0000-0000-000000000000 --tenant-id 00000000-0000-0000-0000-000000000000 --out-profile dev
az group list --profile prod
Login with device code
az login --subscription-id 00000000-0000-0000-0000-000000000000 --use-device-code
Login with a managed identity
az login --identity --subscription-id 00000000-0000-0000-0000-000000000000
Login with a user-assigned managed identity
az login --identity --client-id 00000000-0000-0000-0000-000000000000 --subscription-id 00000000-0000-0000-0000-000000000000
Login with a managed identity using short flags
az login -i --subscription-id 00000000-0000-0000-0000-000000000000
Login with a service principal using a secret
az login --service-principal --client-id 00000000-0000-0000-0000-000000000000 --client-secret MySecret --tenant 00000000-0000-0000-0000-000000000000 --subscription-id 00000000-0000-0000-0000-000000000000
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Client ID of the user-assigned managed identity, or the application ID when used with --service-principal.
| Property | Value |
|---|---|
| Parameter group: | Managed Identity Arguments |
Client secret for the service principal.
Federated token issued by a trusted external identity provider. The issuer and subject must be configured as a federated credential on the application.
Login using managed identity in the current environment.
| Property | Value |
|---|---|
| Parameter group: | Managed Identity Arguments |
Object ID of the user-assigned managed identity.
| Property | Value |
|---|---|
| Parameter group: | Managed Identity Arguments |
Create or overwrite a named profile with the login result (mutually exclusive with --profile).
Re-authenticate the named existing profile (mutually exclusive with --out-profile).
Resource ID of the user-assigned managed identity.
| Property | Value |
|---|---|
| Parameter group: | Managed Identity Arguments |
Login as a service principal using a federated (OIDC) token.
Azure Subscription Id.
Tenant ID to login to.
Use device code flow for authentication.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az logout
Sign out of the active profile.
Sign out of the active profile by removing its account from the token cache and clearing the active-profile pointer. When no profile is active, this command does nothing.
az logout
Examples
Sign out
az logout
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az rest
Send an authenticated HTTP request to Azure Resource Manager.
Universal authenticated HTTP passthrough for Azure Resource Manager (ARM), mirroring az rest. Builds an arbitrary request from the supplied method, endpoint, body, and headers, sends it through the already-authenticated pipeline, and surfaces the raw status code, response headers, and body. There is no LRO polling and no pagination — a single request is sent and a single untyped response is returned. The ARM bearer token is attached to every request, so absolute URLs must target an Azure management host (management.azure.com and the US Gov, China, and Germany sovereign clouds). The endpoint can be supplied two ways, which are mutually exclusive: as a full URL with --uri, or piece-wise with the ByParameters flags (--subscription, --resource-group, --resource-provider, --resource-type, --name, --api-version). Supported parameters: --method (HTTP method, defaults to GET), --uri (absolute URL or relative ARM path; {subscriptionId} is replaced with the current subscription), --body (request body, typically JSON; sent whenever provided, for any method), --headers (KEY=VALUE request headers), --subscription, --resource-group, --resource-provider, --resource-type, --name, --api-version, and --uri-parameters (KEY=VALUE query-string parameters, allowed in both modes). An HTTP status of 400 or higher still prints the response body but exits non-zero.
az rest [--api-version]
[--body]
[--headers]
[--method]
[--name]
[--profile]
[--resource-group]
[--resource-provider]
[--resource-type]
[--subscription]
[--uri]
[--uri-parameters]
Examples
GET a resource group with a full URI
az rest --method GET --uri "/subscriptions/{subscriptionId}/resourceGroups/myresourcegroup?api-version=2021-04-01"
GET a resource using the piece-wise ByParameters flags
az rest --method GET --subscription 00000000-0000-0000-0000-000000000000 --resource-group myresourcegroup --resource-provider Microsoft.Storage --resource-type storageAccounts --name mystorageacct --api-version 2023-01-01
PUT a resource with a JSON body and a custom header
az rest --method PUT --uri "/subscriptions/{subscriptionId}/resourceGroups/myresourcegroup?api-version=2021-04-01" --body '{"location":"eastus"}' --headers Content-Type=application/json
List resources with an extra query-string parameter
az rest --method GET --uri "/subscriptions/{subscriptionId}/resources" --uri-parameters api-version=2021-04-01 '$filter=resourceType eq '\''Microsoft.Storage/storageAccounts'\'''
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
api-version for a piece-wise ARM URL. Required when building from flags. Mutually exclusive with --uri.
Optional request body (typically JSON); sent whenever provided, for any method.
Optional request headers in KEY=VALUE form (space-separated).
HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). Defaults to GET.
Resource name segments (space-separated), interleaved with --resource-type (may have one fewer entry for a collection GET). Mutually exclusive with --uri.
Use the named profile for this command (overrides the active profile).
Resource group name segment for a piece-wise ARM URL. Mutually exclusive with --uri.
Resource provider namespace (e.g. Microsoft.Resources) for a piece-wise ARM URL. Mutually exclusive with --uri.
Resource type segments (space-separated), interleaved with --name, for a piece-wise ARM URL. Mutually exclusive with --uri.
Subscription id used to build an ARM URL from piece-wise flags. Defaults to the current subscription. Mutually exclusive with --uri.
Absolute URL or relative ARM path. Relative paths are prefixed with https://management.azure.com. The token {subscriptionId} is replaced with the current subscription. Mutually exclusive with the piece-wise ByParameters flags.
Optional query-string parameters in KEY=VALUE form (space-separated), appended to the final URL. Allowed in both --uri and ByParameters modes.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az survey
Open the feedback form in the default System Browser to provide feedback about Azure CLI.
az survey
Examples
Open the system browser to the feedback form
az survey
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.