Search code examples
azurevisual-studio-codeazure-active-directoryazure-marketplace

Sign in to Azure Account from VS Code


I have the latest version of Visual Studio Code 1.19.2. It's a clean installation.

I've installed Azure Extension Pack from Microsoft with Azure Account (0.2.2). But I am not able to sign in to my Azure subscription. When I type Azure: Sign In in the commands pallete (CTRL+Shift+P), it only shows Azure: Logging in... in the bottom purple line, but nothing happens. I am not signed in.

As far as I know it should open browser window with login screen, but it does not. My default browser is Edge, my operating system is Windows 10 Enterprise x64 1709 with all updates.

How to sign in to my Azure subscription?


Solution

  • It happens because your corporate network has blocked the proxy to execute the Azure: SignIn command. So the solution is to add value HTTPS_PROXY in the environment variable to allow the web browser to open up the Azure Sign in the login page.

    export HTTPS_PROXY=http://username:password@proxy:8080
    export HTTP_PROXY=http://username:password@proxy:8080