az
Note
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.
Commands
Name | Description | Type | Status |
---|---|---|---|
az acat |
Manage App Compliance Automation Tool reports. |
Extension | GA |
az account |
Manage Azure subscription information. |
Core and Extension | GA |
az acr |
Manage private registries with Azure Container Registries. |
Core and Extension | GA |
az ad |
Manage Microsoft Entra ID (formerly known as Azure Active Directory, Azure AD, AAD) entities needed for Azure role-based access control (Azure RBAC) through Microsoft Graph API. |
Core and Extension | GA |
az advisor |
Manage Azure Advisor. |
Core | GA |
az afd |
Manage Azure Front Door Standard/Premium. |
Core | GA |
az ai-examples |
Add AI powered examples to help content. |
Extension | Preview |
az aks |
Manage Azure Kubernetes Services. |
Core and Extension | GA |
az aksarc |
Manage provisioned clusters. |
Extension | GA |
az akshybrid |
Manage provisioned clusters. |
Extension | Preview |
az alerts-management |
Manage Azure Alerts Management Service Resource. |
Extension | GA |
az alias |
Manage Azure CLI Aliases. |
Extension | GA |
az amlfs |
Manage lustre file system. |
Extension | GA |
az ams |
Manage Azure Media Services resources. |
Core | GA |
az aosm |
Manage Azure Operator Service Manager resources. |
Extension | Preview |
az apic |
Manage Azure API Center services. |
Extension | GA |
az apim |
Manage Azure API Management services. |
Core | GA |
az appconfig |
Manage App Configurations. |
Core | GA |
az appservice |
Manage App Service plans. |
Core and Extension | GA |
az arc-multicloud |
Commands for arc-multicloud. |
Extension | GA |
az arcappliance |
Commands to manage Arc resource bridge. |
Extension | GA |
az arcdata |
Commands for using Azure Arc-enabled data services. |
Extension | GA |
az arcgateway |
Manage gateway connection on Arc machine. |
Extension | GA |
az aro |
Manage Azure Red Hat OpenShift clusters. |
Core | GA |
az artifacts |
Manage Azure Artifacts. |
Extension | GA |
az astronomer |
Manage Azure Astronomer resources. |
Extension | GA |
az attestation |
Manage Microsoft Azure Attestation (MAA). |
Extension | Experimental |
az automanage |
Manage Automanage. |
Extension | GA |
az automation |
Manage Automation Account. |
Extension | GA |
az azurestackhci |
Manage azurestackhci. |
Extension | Experimental |
az backup |
Manage Azure Backups. |
Core | GA |
az baremetalinstance |
Handle Operations for Compute Azure Bare Instances. |
Extension | GA |
az baremetalstorageinstance |
Handle Operations for Storage Azure Bare Metal Instances. |
Extension | GA |
az batch |
Manage Azure Batch. |
Core and Extension | GA |
az batchai |
Manage Batch AI resources. |
Core | Deprecated |
az bicep |
Bicep CLI command group. |
Core | GA |
az billing |
Manage Azure Billing. |
Core | GA |
az billing-benefits |
Azure billing benefits commands. |
Extension | GA |
az blueprint |
Commands to manage blueprint. |
Extension | GA |
az boards |
Manage Azure Boards. |
Extension | GA |
az bot |
Manage Microsoft Azure Bot Service. |
Core | GA |
az cache |
Commands to manage CLI objects cached using the |
Core | GA |
az capacity |
Manage capacity. |
Core | GA |
az cdn |
Manage Azure Content Delivery Networks (CDNs). |
Core | GA |
az change-analysis |
List changes for resources. |
Extension | GA |
az cli-translator |
Translate ARM template or REST API to CLI scripts. |
Extension | Experimental |
az cloud |
Manage registered Azure clouds. |
Core | GA |
az cloud-service |
Manage cloud service. |
Extension | Experimental |
az cognitiveservices |
Manage Azure Cognitive Services accounts. |
Core | GA |
az command-change |
Commands for CLI modules metadata management. |
Extension | GA |
az communication |
Manage communication service with communication. |
Extension | GA |
az compute-fleet |
Manage for Azure Compute Fleet. |
Core | Preview |
az compute-recommender |
Manage sku/zone/region recommender info for compute resources. |
Core | Preview |
az confcom |
Commands to generate security policies for confidential containers in Azure. |
Extension | GA |
az confidentialledger |
Manage Confidential Ledger. |
Extension | GA |
az config |
Manage Azure CLI configuration. |
Core | Experimental |
az configure |
Manage Azure CLI configuration. This command is interactive. |
Core | GA |
az confluent |
Manage confluent organization. |
Extension | GA |
az connectedk8s |
Commands to manage connected kubernetes clusters. |
Extension | GA |
az connectedmachine |
Manage Azure Arc-Enabled Server. |
Extension | GA |
az connectedvmware |
Commands to manage Connected VMware. |
Extension | GA |
az connection |
Commands to manage Service Connector local connections which allow local environment to connect Azure Resource. If you want to manage connection for compute service, please run 'az webapp/containerapp/spring connection'. |
Core and Extension | GA |
az consumption |
Manage consumption of Azure resources. |
Core | Preview |
az container |
Manage Azure Container Instances. |
Core and Extension | GA |
az containerapp |
Manage Azure Container Apps. |
Core and Extension | GA |
az cosmosdb |
Manage Azure Cosmos DB database accounts. |
Core and Extension | GA |
az costmanagement |
Costmanagement. |
Extension | GA |
az csvmware |
Manage Azure VMware Solution by CloudSimple. |
Extension | Preview |
az custom-providers |
Commands to manage custom providers. |
Extension | GA |
az customlocation |
Commands to Create, Get, List and Delete CustomLocations. |
Extension | GA |
az data-boundary |
Data boundary operations. |
Core | GA |
az databox |
Manage data box. |
Extension | GA |
az databoxedge |
Manage device with databoxedge. |
Core | Preview |
az databricks |
Manage databricks workspaces. |
Extension | GA |
az datadog |
Manage datadog. |
Extension | GA |
az datafactory |
Manage Data Factory. |
Extension | GA |
az datamigration |
Manage Data Migration. |
Extension | GA |
az dataprotection |
Manage dataprotection. |
Extension | GA |
az datashare |
Manage Data Share. |
Extension | Experimental |
az dedicated-hsm |
Manage dedicated hsm with hardware security modules. |
Extension | GA |
az demo |
Demos for designing, developing and demonstrating Azure CLI. |
Core | Deprecated |
az deployment |
Manage Azure Resource Manager template deployment at subscription scope. |
Core | GA |
az deployment-scripts |
Manage deployment scripts at subscription or resource group scope. |
Core | GA |
az desktopvirtualization |
Manage desktop virtualization. |
Extension | GA |
az devcenter |
Manage resources with devcenter. |
Extension | GA |
az devops |
Manage Azure DevOps organization level operations. |
Extension | GA |
az disk |
Manage Azure Managed Disks. |
Core | GA |
az disk-access |
Manage disk access resources. |
Core | GA |
az disk-encryption-set |
Disk Encryption Set resource. |
Core | GA |
az disk-pool |
Manage Azure disk pool. |
Extension | GA |
az dls |
Manage Data Lake Store accounts and filesystems. |
Core | Preview |
az dms |
Manage Azure Data Migration Service (classic) instances. |
Core and Extension | GA |
az dnc |
Manage Delegated Network. |
Extension | Preview |
az dns-resolver |
Manage Dns Resolver. |
Extension | GA |
az dt |
Manage Azure Digital Twins solutions & infrastructure. |
Extension | GA |
az durabletask |
Commands to manage Durabletasks. |
Extension | Preview |
az dynatrace |
Manage dynatrace. |
Extension | GA |
az edge-zones |
Manage Edge Zone resources. |
Extension | Preview |
az edgeorder |
Manage Edge Order. |
Extension | GA |
az elastic |
Manage Microsoft Elastic. |
Extension | GA |
az elastic-san |
Manage Elastic SAN. |
Extension | GA |
az eventgrid |
Manage Azure Event Grid topics, domains, domain topics, system topics partner topics, event subscriptions, system topic event subscriptions and partner topic event subscriptions. |
Core and Extension | GA |
az eventhubs |
Eventhubs. |
Core | GA |
az extension |
Manage and update CLI extensions. |
Core | GA |
az fabric |
Manage Microsoft Fabric resources. |
Extension | GA |
az feature |
Manage resource provider features. |
Core | GA |
az feedback |
Send feedback to the Azure CLI Team. |
Core | GA |
az find |
I'm an AI robot, my advice is based on our Azure documentation as well as the usage patterns of Azure CLI and Azure ARM users. Using me improves Azure products and documentation. |
Core | GA |
az firmwareanalysis |
Commands to manage firmware analysis. |
Extension | GA |
az fleet |
Commands to manage fleet. |
Extension | GA |
az fluid-relay |
Manage Fluid Relay. |
Extension | GA |
az footprint | Extension | GA | |
az functionapp |
Manage function apps. To install the Azure Functions Core tools see https://github.com/Azure/azure-functions-core-tools. |
Core and Extension | GA |
az fzf |
Commands to select active or default objects via fzf. |
Extension | GA |
az gallery |
Azure Compute Gallery. |
Extension | GA |
az grafana |
Commands to manage Azure Managed Grafana resources. |
Extension | GA |
az graph |
Query the resources managed by Azure Resource Manager. |
Extension | GA |
az graph-services |
Make operations on Microsoft.GraphServices resource types. |
Extension | GA |
az group |
Manage resource groups and template deployments. |
Core | GA |
az guestconfig |
Manage Guest Configuration. |
Extension | GA |
az hack |
Commands to manage resources commonly used for student hacks. |
Extension | GA |
az hanainstance |
(PREVIEW) Manage Azure SAP HANA Instance. |
Extension | GA |
az hdinsight |
Manage HDInsight resources. |
Core | GA |
az hdinsight-on-aks |
HDInsight on Aks CLI. |
Extension | GA |
az healthbot |
Manage bot with healthbot. |
Extension | Experimental |
az healthcareapis |
Azure Healthcare APIs is a secure cloud platform for managing health data, supporting analytics, machine learning, and scalable solutions. |
Extension | GA |
az hpc-cache |
Commands to manage hpc cache. |
Extension | GA |
az identity |
Managed Identities. |
Core | GA |
az image |
Manage custom virtual machine images. |
Core and Extension | GA |
az import-export |
Manage Import Export. |
Extension | Experimental |
az informatica |
Manage Informatica. |
Extension | GA |
az init |
It's an effortless setting up tool for configs. |
Extension | Experimental |
az interactive |
Start interactive mode. Installs the Interactive extension if not installed already. |
Core | Preview |
az internet-analyzer |
Commands to manage internet analyzer. |
Extension | GA |
az iot |
Manage Internet of Things (IoT) assets. |
Core and Extension | GA |
az k8s-configuration |
Commands to manage resources from Microsoft.KubernetesConfiguration. |
Extension | GA |
az k8s-extension |
Commands to manage Kubernetes Extensions. |
Extension | GA |
az k8s-runtime |
Manage Arc Kubernetes Runtime resources. |
Extension | GA |
az k8sconfiguration |
Commands to manage Kubernetes configuration. |
Extension | Preview and Deprecated |
az keyvault |
Manage KeyVault keys, secrets, and certificates. |
Core | GA |
az kusto |
Manage Kusto. |
Extension | Experimental |
az lab |
Manage azure devtest labs. |
Core | Preview |
az large-instance |
Handle Operations for Compute Azure Large Instances. |
Extension | GA |
az large-storage-instance |
Handle Operations for Storage Azure Large Instances. |
Extension | GA |
az load |
Manage Azure Load Testing resources. |
Extension | GA |
az lock |
Manage Azure locks. |
Core | GA |
az logic |
Manage logic. |
Extension | GA |
az logicapp |
Manage logic apps. |
Core | GA |
az login |
Log in to Azure. |
Core | GA |
az logout |
Log out to remove access to Azure subscriptions. |
Core | GA |
az logz |
Manage Microsoft Logz. |
Extension | Experimental |
az maintenance |
Manage Maintenance. |
Extension | GA |
az managed-cassandra |
Azure Managed Cassandra. |
Core and Extension | GA |
az managedapp |
Manage template solutions provided and maintained by Independent Software Vendors (ISVs). |
Core | GA |
az managedservices |
Manage the registration assignments and definitions in Azure. |
Core | GA |
az managementpartner |
Allows the partners to associate a Microsoft Partner Network(MPN) ID to a user or service principal in the customer's Azure directory. |
Extension | GA |
az maps |
Manage Azure Maps. |
Core | GA |
az mariadb |
Manage Azure Database for MariaDB servers. |
Core | GA |
az mcc |
Microsoft Connected Cache CLI Commands. |
Extension | GA |
az mdp |
Manage resources of Managed DevOps pools. |
Extension | GA |
az mesh |
(PREVIEW) Manage Azure Service Fabric Mesh Resources. |
Extension | Preview |
az ml |
Manage Azure Machine Learning resources with the Azure CLI ML extension v2. |
Extension | GA |
az ml |
Manage Azure Machine Learning resources with the Azure CLI ML extension v1. |
Extension | GA |
az mobile-network |
Manage mobile network. |
Extension | GA |
az monitor |
Manage the Azure Monitor Service. |
Core and Extension | GA |
az mysql |
Manage Azure Database for MySQL servers. |
Core and Extension | GA |
az neon |
Manage Neon Postgres. |
Extension | Preview |
az netappfiles |
Manage Azure NetApp Files (ANF) Resources. |
Core and Extension | GA |
az network |
Manage Azure Network resources. |
Core and Extension | GA |
az network-analytics |
Network Analytics command group Azure Operator Insights resource manipulation. |
Extension | GA |
az network-function |
Manage network function. |
Extension | GA |
az networkcloud |
Manage Network Cloud resources. |
Extension | Preview |
az networkfabric |
Manage Azure Network Fabric Management Service API. |
Extension | GA |
az new-relic |
Manage Azure NewRelic resources. |
Extension | GA |
az next |
Recommend the possible next set of commands to take. |
Extension | Experimental |
az nexusidentity |
Command to manage Nexusidentity keys. |
Extension | GA |
az nginx |
Manage NGINX deployment resources. |
Extension | GA |
az notification-hub |
Manage notification hubs. |
Extension | Experimental |
az offazure |
Manage on-premise resources for migrate. |
Extension | Experimental |
az oracle-database |
Command Modules for RP Oracle.Database. |
Extension | GA |
az orbital |
Azure Orbital Ground Station as-a-Service (GSaaS). |
Extension | GA |
az palo-alto |
Manage palo-alto networks resource. |
Extension | GA |
az partnercenter |
Partner Center management. |
Extension | GA |
az peering |
Manage peering. |
Extension | GA |
az pipelines |
Manage Azure Pipelines. |
Extension | GA |
az policy |
Manage resource policies. |
Core | GA |
az portal |
Manage Portal. |
Extension | Experimental |
az postgres |
Manage Azure Database for PostgreSQL servers. |
Core and Extension | GA |
az powerbi |
Manage PowerBI resources. |
Extension | GA |
az ppg |
Manage Proximity Placement Groups. |
Core | GA |
az private-link |
Private-link association CLI command group. |
Core | GA |
az provider |
Manage resource providers. |
Core | GA |
az providerhub |
Manage resources with ProviderHub. |
Extension | GA |
az purview |
Manage Purview. |
Extension | Preview |
az quantum |
Manage Azure Quantum Workspaces and submit jobs to Azure Quantum Providers. |
Extension | Preview |
az qumulo |
Manage qumulo. |
Extension | GA |
az quota |
Manag quota for Azure resource providers. |
Extension | GA |
az redis |
Manage dedicated Redis caches for your Azure applications. |
Core | GA |
az redisenterprise |
Manage the redisenterprise cache. |
Extension | GA |
az relay |
Manage Azure Relay Service namespaces, WCF relays, hybrid connections, and rules. |
Core | GA |
az remote-rendering-account |
Manage remote rendering account with mixed reality. |
Extension | GA |
az repos |
Manage Azure Repos. |
Extension | GA |
az reservations |
Azure Reservations. |
Extension | Preview |
az resource |
Manage Azure resources. |
Core | GA |
az resource-mover |
Manage Resource Mover Service API. |
Extension | GA |
az resourcemanagement |
Resourcemanagement CLI command group. |
Core | GA |
az rest |
Invoke a custom request. |
Core | GA |
az restore-point |
Manage restore point with res. |
Core | GA |
az role |
Manage Azure role-based access control (Azure RBAC). |
Core | GA |
az sapmonitor |
(PREVIEW) Manage Azure SAP Monitor. |
Extension | GA |
az scenario |
E2E Scenario Usage Guidance. |
Extension | GA |
az scvmm |
Commands for managing Arc for SCVMM resources. |
Extension | GA |
az search |
Manage Azure Search services, admin keys and query keys. |
Core | GA |
az security |
Manage your security posture with Microsoft Defender for Cloud. |
Core | GA |
az self-help |
Azure SelfHelp will help you troubleshoot issues with Azure resources. |
Extension | Preview |
az self-test |
Runs a self-test of the CLI. |
Core | Deprecated |
az sentinel |
Manage Microsoft Sentinel. |
Extension | GA |
az serial-console |
Connect to the Serial Console of a Linux/Windows Virtual Machine or VMSS Instance. |
Extension | GA |
az servicebus |
Servicebus. |
Core | GA |
az sf |
Manage and administer Azure Service Fabric clusters. |
Core | GA |
az sig |
Manage shared image gallery. |
Core and Extension | GA |
az signalr |
Manage Azure SignalR Service. |
Core | GA |
az site-recovery |
Manage Site Recovery Service. |
Extension | GA |
az snapshot |
Manage point-in-time copies of managed disks, native blobs, or other snapshots. |
Core | GA |
az spatial-anchors-account |
Manage spatial anchor account with mixed reality. |
Extension | GA |
az sphere |
Manage Azure Sphere resources. |
Extension | GA |
az spring |
Commands to manage Azure Spring Apps. |
Core and Extension | GA |
az spring-cloud |
Commands to manage Azure Spring Cloud. |
Core and Extension | Deprecated |
az sql |
Manage Azure SQL Databases and Data Warehouses. |
Core and Extension | GA |
az ssh |
SSH into resources (Azure VMs, Arc servers, etc) using AAD issued openssh certificates. |
Extension | GA |
az sshkey |
Manage ssh public key with vm. |
Core | GA |
az stack |
A deployment stack is a native Azure resource type that enables you to perform operations on a resource collection as an atomic unit. |
Core | GA |
az stack-hci |
Manage Azure Stack HCI. |
Extension | GA |
az stack-hci-vm |
Manage virtualmachine with stack-hci-vm. |
Extension | GA |
az standby-container-group-pool |
Standby Container Group Pool Operations. |
Extension | GA |
az standby-vm-pool |
Standby Virtual Machine Pool Operations. |
Extension | GA |
az staticwebapp |
Manage static apps. |
Core and Extension | GA |
az storage |
Manage Azure Cloud Storage resources. |
Core and Extension | GA |
az storage-actions |
Manage StorageActions. |
Extension | Preview |
az storage-mover |
Manage top-level Storage Mover resource. |
Extension | GA |
az storagesync |
Manage Azure File Sync. |
Extension | GA |
az stream-analytics |
Manage Stream Analytics. |
Extension | GA |
az support |
Manage Azure support resource. |
Extension | GA |
az survey |
Take Azure CLI survey. |
Core | GA |
az synapse |
Manage and operate Synapse Workspace, Spark Pool, SQL Pool. |
Core | GA |
az tag |
Tag Management on a resource. |
Core | GA |
az term |
Manage marketplace agreement with marketplaceordering. |
Core | Experimental |
az terraform |
Azure Terraform experience. |
Extension | Preview |
az trustedsigning |
Manage trusted signing account. |
Extension | Preview |
az ts |
Manage template specs at subscription or resource group scope. |
Core | GA |
az tsi |
Manage Azure Time Series Insights. |
Extension | GA |
az upgrade |
Upgrade Azure CLI and extensions. |
Core | Preview |
az version |
Show the versions of Azure CLI modules and extensions in JSON format by default or format configured by --output. |
Core | GA |
az vm |
Manage Linux or Windows virtual machines. |
Core and Extension | GA |
az vmss |
Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS). |
Core | GA |
az vmware |
Commands to manage Azure VMware Solution. |
Extension | GA |
az webapp |
Manage web apps. |
Core and Extension | GA |
az webpubsub |
Commands to manage Webpubsub. |
Extension | GA |
az workloads |
Manage workloads. |
Extension | Preview |
az configure
Manage Azure CLI configuration. This command is interactive.
For automation scenarios or to set all available options, use the new az config
.
az configure [--defaults]
[--list-defaults {false, true}]
[--scope {global, local}]
Examples
Set default resource group, webapp and VM names.
az configure --defaults group=myRG web=myweb vm=myvm
Clear default webapp and VM names.
az configure --defaults vm='' web=''
Optional Parameters
Space-separated 'name=value' pairs for common argument defaults.
List all applicable defaults.
Scope of defaults. Using "local" for settings only effective under current folder.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az feedback
Send feedback to the Azure CLI Team.
This command is interactive. If possible, it launches the default web browser to open GitHub issue creation page with the body auto-generated and pre-filled. You will have a chance to edit the issue body before submitting it.
az feedback
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az find
I'm an AI robot, my advice is based on our Azure documentation as well as the usage patterns of Azure CLI and Azure ARM users. Using me improves Azure products and documentation.
az find [<CLI_TERM>]
Examples
Give me any Azure CLI group and I’ll show the most popular commands within the group.
az find "az storage"
Give me any Azure CLI command and I’ll show the most popular parameters and subcommands.
az find "az monitor activity-log list"
You can also enter a search term, and I'll try to help find the best commands.
az find "arm template"
Optional Parameters
An Azure CLI command or group for which you need an example.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az init
This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
It's an effortless setting up tool for configs.
az init
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az interactive
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Start interactive mode. Installs the Interactive extension if not installed already.
For more information on interactive mode, see: https://azure.microsoft.com/blog/welcome-to-azure-cli-shell/.
az interactive [--style {bg, br, contrast, default, grey, halloween, neon, none, pastel, primary, purple, quiet}]
[--update]
Optional Parameters
The colors of the shell.
Update the Interactive extension to the latest available.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az login
Log in to Azure.
By default, this command logs in with a user account. Azure CLI uses Web Account Manager (WAM) on Windows, and browser-based login on Linux and macOS by default. If WAM or a web browser is not available, Azure CLI will fall back to device code login.
[WARNING] Authentication with username and password in the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For more details, see https://go.microsoft.com/fwlink/?linkid=2276314
[WARNING] --password
no longer accepts a service principal certificate. Use --certificate
to pass a service principal certificate.
To log in with a service principal, specify --service-principal.
To log in with a managed identity, specify --identity.
For more details, see https://learn.microsoft.com/cli/azure/authenticate-azure-cli.
az login [--allow-no-subscriptions]
[--certificate]
[--federated-token]
[--identity]
[--password]
[--scope]
[--service-principal]
[--tenant]
[--use-cert-sn-issuer]
[--use-device-code]
[--username]
Examples
Log in interactively.
az login
Log in with username and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled. Use -p=secret if the first character of the password is '-'.
az login --username johndoe@contoso.com --password VerySecret
Log in with a service principal using client secret. Use --password=secret if the first character of the password is '-'.
az login --service-principal --username APP_ID --password CLIENT_SECRET --tenant TENANT_ID
Log in with a service principal using certificate.
az login --service-principal --username APP_ID --certificate /path/to/cert.pem --tenant TENANT_ID
Log in with a system-assigned managed identity.
az login --identity
Log in with a user-assigned managed identity. You must specify the client ID, object ID or resource ID of the user-assigned managed identity with --username.
az login --identity --username 00000000-0000-0000-0000-000000000000
Optional Parameters
Support accessing tenants without subscriptions. It's useful to run tenant-level commands, such as 'az ad'.
PEM file with key and public certificate.
Federated token that can be used for OIDC token exchange.
Log in using managed identity.
User password or service principal secret. Will prompt if not given.
Used in the /authorize request. It can cover only one static resource.
Log in with a service principal.
The Microsoft Entra tenant, must be provided when using a service principal.
Use Subject Name + Issuer (SN+I) authentication in order to support automatic certificate rolls.
Use device code flow. Azure CLI will also use this if it can't launch a browser, e.g. in remote SSH or Cloud Shell.
User name, service principal client ID, or managed identity ID.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az logout
Log out to remove access to Azure subscriptions.
az logout [--username]
Optional Parameters
Account user, if missing, logout the current active account.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az next
This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Recommend the possible next set of commands to take.
There are some custom configurations:
[1] az config set next.execute_in_prompt=True/False Turn on/off the step of executing recommended commands in interactive mode. Turn on by default.
[2] az config set next.recommended_type=all/scenario/command Set the default recommended type. All is the default.
[3] az config set next.output=json/jsonc/none/table/tsv/yaml/yamlc/status Set default output format. Status is the default.
[4] az config set next.command_num_limit={command_amount_limit} Set the limit of recommended command items. 5 is the default.
[5] az config set next.scenario_num_limit={scenario_amount_limit} Set the limit of recommended scenario items. 5 is the default.
[6] az config set next.show_arguments=True/False Show/hide the arguments of recommended items. False is the default.
[7] az config set next.print_help=True/False Enable/disable whether to print help actively before executing each command. False is the default.
az next [--command]
[--scenario]
Optional Parameters
Specify this parameter will only recommend commands.
Specify this parameter will only recommend E2E scenarios.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az rest
Invoke a custom request.
This command automatically authenticates using the logged-in credential: If Authorization header is not set, it attaches header Authorization: Bearer <token>
, where <token>
is retrieved from AAD. The target resource of the token is derived from --url if --url starts with an endpoint from az cloud show --query endpoints
. You may also use --resource for a custom resource.
If Content-Type header is not set and --body is a valid JSON string, Content-Type header will default to application/json.
For passing JSON in PowerShell, see https://github.com/Azure/azure-cli/blob/dev/doc/quoting-issues-with-powershell.md.
az rest --uri
[--body]
[--headers]
[--method {delete, get, head, options, patch, post, put}]
[--output-file]
[--resource]
[--skip-authorization-header]
[--uri-parameters]
Examples
Get Audit log through Microsoft Graph
az rest --method get --url https://graph.microsoft.com/beta/auditLogs/directoryAudits
Update a Azure Active Directory Graph User's display name
(Bash or CMD)
az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body "{\"displayName\": \"johndoe2\"}"
(Bash)
az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body '{"displayName": "johndoe2"}'
(PowerShell)
az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body '{\"displayName\": \"johndoe2\"}'
Get a virtual machine
az rest --method get --uri /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?api-version=2019-03-01
Create a public IP address from body.json file
az rest --method put --url https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}?api-version=2019-09-01 --body @body.json
List the top three resources (Bash)
az rest --method get --url https://management.azure.com/subscriptions/{subscriptionId}/resources?api-version=2019-07-01 --url-parameters \$top=3
Required Parameters
Request URL. If it doesn't start with a host, CLI assumes it as an Azure resource ID and prefixes it with the ARM endpoint of the current cloud shown by az cloud show --query endpoints.resourceManager
. Common token {subscriptionId} will be replaced with the current subscription ID specified by az account set
.
Optional Parameters
Request body. Use @{file} to load from a file. For quoting issues in different terminals, see https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#quoting-issues.
Space-separated headers in KEY=VALUE format or JSON string. Use @{file} to load from a file.
HTTP request method.
Save response payload to a file.
Resource url for which CLI should acquire a token from AAD in order to access the service. The token will be placed in the Authorization header. By default, CLI can figure this out based on --url argument, unless you use ones not in the list of "az cloud show --query endpoints".
Do not auto-append Authorization header.
Query parameters in the URL. Space-separated queries in KEY=VALUE format or JSON string. Use @{file} to load from a file.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az self-test
This command has been deprecated and will be removed in a future release.
Runs a self-test of the CLI.
az self-test
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az survey
Take Azure CLI survey.
Help us improve Azure CLI by sharing your experience. This survey should take about 3 minutes. Learn more at https://go.microsoft.com/fwlink/?linkid=2203309.
az survey
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az upgrade
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Upgrade Azure CLI and extensions.
az upgrade [--all {false, true}]
[--allow-preview {false, true}]
[--yes]
Optional Parameters
Enable updating extensions as well.
Include preview packages for extension installation, if exists.
Do not prompt for checking release notes.
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az version
Show the versions of Azure CLI modules and extensions in JSON format by default or format configured by --output.
az version
Global Parameters
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.