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 VM Backup Pricing
  • Azure VM
  • What Is Edge Location In AWS
  • DP-300 Certification
  • What Is Cloud Shell In Azure
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons
Azure
Virtual
Machine
By: Rajkishore
Azure Consultant
PDF

Free 25+ page PDF

Download free Azure Virtual Machine PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!

No spam, ever. You will also get new Azure tutorials by email. Unsubscribe any time. Privacy policy

Check your inbox

Your Azure Virtual Machine PDF is on its way to . Can't find it in a few minutes? Look in your Promotions or Spam folder.