How to login to Azure with Azure CLI

0 votes

Hi Team,

I have installed Azure CLI in the Windows system. I want to login to Azure with the CLI. How can I do that?

Nov 10, 2020 in Azure by akhtar
• 38,210 points
173 views

1 answer to this question.

0 votes

Hi@akhtar,

You can run the Azure CLI with the az command from either Windows Command Prompt or PowerShell. It will redirect to the browser and you need to provide your user ID and password.

$ az login
You have logged in. Now let us find all the subscriptions to which you have access...
[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "xxxxxxxxxxxxxxxxxxx",
    "id": "xxxxxxxxxxxxxxxxxxx",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Azure for Students",
    "state": "Enabled",
    "tenantId": "xxxxxxxxxxxxxxxxxxx",
    "user": {
      "name": "xxxxxxxxxxxxxxxxxxx",
      "type": "user"
    }
  }
]
answered Nov 10, 2020 by MD
• 95,300 points

Related Questions In Azure

0 votes
1 answer

How can i upload to Azure Blob storage with Shared Access key?

For GetBlobReferenceFromServer to work, the blob must be present ...READ MORE

answered Jun 12, 2018 in Azure by club_seesharp
• 3,450 points
2,194 views
0 votes
1 answer

How to add a body to a HttpWebRequest that is being used with the Azure Service management API?

The following code should help: byte[] buf = ...READ MORE

answered Apr 3, 2019 in Azure by p
• 1,960 points
527 views
0 votes
1 answer

How to know the Azure backup frequency/retention range associated with Azure Backup Policy?

The following code snippet will provide you ...READ MORE

answered Apr 8, 2019 in Azure by p
• 1,960 points
636 views
0 votes
1 answer

How to run Azure CLI in a Docker container?

H@akhtar, You can use Docker to run a ...READ MORE

answered Nov 13, 2020 in Azure by MD
• 95,300 points
618 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to install Azure CLI with yum?

Hi@akhtar, For Linux distributions with yum such as RHEL, Fedora, ...READ MORE

answered Nov 13, 2020 in Azure by MD
• 95,300 points
2,791 views
0 votes
1 answer

How to install Azure CLI on Windows?

Hi@akhtar, For Windows, the Azure CLI is installed ...READ MORE

answered Nov 10, 2020 in Azure by MD
• 95,300 points
453 views