Sign in to Azure Account from VS Code

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

For me I just copied the Azure tenant ID from the portal: Go to ActiveDirectoy in Azure then go to properties you'll see the tenant ID.

Now just paste the tenant ID in vscode: File->Preferences->Settings, then search for keyword "tenant" and add your Azure tenant id.


Can you see this strip pop out?

enter image description here

Edit: if not install Azure Tools For VScode

only after clicking "Sign in" you should get a browser window open where you have to paste the code.