I can't seem to run az login - it freezes after showing my subscription IDs and asking me to select them

Abe 0 Reputation points
2025-01-26T22:43:46.9366667+00:00

I installed az in VSCode via

pip install az-cli

and then ran az login which popped up an interactive login process. it got as far as outlining the subscription names but I can't seem to press enter or do anything- it seems to hang and prevent me from moving forward.

Any help is appreciated.

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
709 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Krishna Katakam 1,710 Reputation points Microsoft Vendor
    2025-01-27T11:40:52.9+00:00

    Hi Abe,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    It seems like you're experiencing an issue where the az login command hangs after showing your subscription IDs. Here are some troubleshooting steps that might help:

    Make sure that you're using the latest version of Azure CLI, as updates often resolve known issues. You can update it using:

    pip install --upgrade azure-cli
    

    If the issue is related to fetching subscriptions, you can try logging in without fetching them:

    az login --allow-no-subscriptions
    

    After logging in, you can manually set the subscription later if needed:

    az account set --subscription <subscription-id>
    

    Clearing the Azure CLI cache can help resolve issues related to account sessions. Run the following command:

    az account clear
    

    If you're using VSCode's integrated terminal, try running the az login command in a standard Command Prompt or PowerShell window to see if that resolves the issue.

    If you have any further queries, do let us know. If the comment is helpful, please click "Upvote".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.