Forrest logo
back to the az tool

az-login:tldr:c1d0c

az-login: Log in using a VM's system assigned identity.
$ az login --identity
try on your machine

The command "az login --identity" is used to login to Azure using a managed identity.

Azure Managed Identity is a service that simplifies the management of identity and access for Azure resources. It allows you to authenticate to Azure services without the need to store any credentials within your application code or on the server environment.

When you execute the command "az login --identity", it uses the managed identity associated with the current environment or resource to authenticate and establish a session with Azure. This means that you don't need to provide any credentials manually, as the identity is automatically generated and managed by Azure itself.

Once the authentication is successful, you are logged into Azure and can start using various Azure CLI commands to manage resources, deploy applications, and perform other tasks specific to your environment.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool