Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure
    • Azure Virtual Machine
    • Azure Active Directory
    • Azure CLI
    • Azure CLI Commands List
    • Azure Cognitive Services
    • Azure Cosmos DB
    • Azure DevOps
    • Azure Functions
    • Azure PowerShell Commands
    • Azure Sentinel
    • Azure SQL
    • Azure Storage
    • Azure Synapse
  • Blogs
  • FREE EBOOK

Az login –identity

February 26, 2024 by Rajkishore

This article will explain the syntax and usage of the az login –identity command.

Table of Contents

  • Az login –identity
    • Syntax of az login –identity
    • Az login –identity Examples

Az login –identity

This command can sign in with a managed identity using Azure CLI.

Syntax of az login –identity

Below is the syntax of the az login –identity Azure CLI command.

az login --identity
az login --identity --username <client_id|object_id|resource_id>

Az login –identity Examples

Let us discuss an example of how to use the AZ login –identity command.

You can execute the below Azure CLI command to sign in with a managed identity

az login --identity

After executing the above command, I got the expected output as below

 {
    "environmentName": "AzureCloud",
    "homeTenantId": "5d9d690a-0310-474d-ae8b-42df2d549228",
    "id": "1cdf4300-dee5-4518-9c9c-fexx72a5cbd1",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Visual Studio Enterprise",
    "state": "Enabled",
    "tenantId": "5d9d690a-0310-474e-ae8b-42df2d549228",
    "user": {
      "cloudShellID": true,
      "name": "live.com#fewlines4biju@hotmail.com",
      "type": "user"
    }
  }

You can check out the same output in the screenshot below.

az login --identity

You may also like following the articles below.

  • az login command

Conclusion

This article discussed the syntax and usage of the az login –identity Azure CLI command with an example of how to use az login –identity. Thanks for reading this article !!!

Microsoft Azure
Rajkishore

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.

Azure Function Whitelist IP Address
Azure AD Connect Upgrade
Subscribe To Our YouTube Channel Subscribe to AzureLessons YouTube Channel

Recent Posts

  • Azure Front Door vs Application Gateway
  • Azure Container Apps
  • How to Check Azure App Service Logs
  • Azure Advisor vs Azure Monitor
  • How to Get Azure Function URL
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons