Skip to content

Troubleshooting

Alex Weininger edited this page May 10, 2023 · 12 revisions

Table of contents

Enable and view logs

Sharing trace logs can help us investigate issues. Please enable trace logs and redo the failing operation and share the logs in the GitHub issue.

Setting log level to trace

  1. Run Developer: Set Log Level command from the command palette (Press F1 to access the command palette)
  2. Select "Azure Account"
  3. Set the log level to "Trace" for the most detailed logs.

Viewing logs

  1. Run Developer: Show Logs command from the command palette (Press F1 to access the command palette)
  2. Select "Azure Account"

or navigate to the "Azure Account" output channel

Note: Be sure to remove any PII before sharing logs.

Unable to list subscriptions

This is a common problem for users and it typically can be fixed by following the steps below:

Setup your Azure account

This should only be done if you have yet to setup your Azure account with at least one subscription.

  1. Open VS Code and sign out of the Azure Account Extension using the Azure: Sign Out command (accessible via the command palette).
  2. Navigate to azure.microsoft.com and follow the steps there to setup your Azure account.
  3. Once you get your new subscription up and running, open VS Code and sign into the Azure Account Extension using the Azure: Sign In command.
  4. If you're still having trouble viewing your subscriptions, move onto the next troubleshooting section.

Configure your tenant in the Azure Account Extension

These steps need to be taken when the subscription you're looking for is associated with a tenant other the default tenant (which is set for you by the extension).

  1. Open VS Code and ensure you are signed into the Azure Account Extension. You may sign in using the Azure: Sign In command (accessible via the command palette).
  2. Run the Azure: Select Tenant command.
  3. Select a new tenant from the list of displayed tenants.
  4. Sign out then sign back in for the new tenant to take effect.

If selecting a tenant from the list fails to solve your problem, try again with a different tenant. If you're unable to list tenants or if you exhaust the list of tenants, follow these steps to manually find your tenant ID:

  1. Ensure subscriptions are listed for your account when you sign into the Azure portal.
  2. Follow these instructions to find your tenant ID.
  3. Run the Azure: Select Tenant command.
  4. Select "Enter custom tenant" and enter the tenant ID from above.
  5. Sign out then sign back in for the new tenant to take effect.

If you still aren't able to list subscriptions after following these steps, please consider filing an issue so we can better understand why this problem is occurring.

Unable to sign in while using a proxy

Add login.microsoftonline.com to the NO_PROXY environment variable

Adding login.microsoftonline.com to your NO_PROXY environment variable will let requests to login.microsoftonline.com bypass the proxy. (original suggestion)

Using PowerShell

# Append to existing NO_PROXY environment variable
$Env:NO_PROXY += ',login.microsoftonline.com'

# Set the NO_PROXY environment variable for the first time
$Env:Foo = 'login.microsoftonline.com'

Make sure to close and re-open all VS Code windows after adding the environment variable.

Network Proxy Test

Install the Network Proxy Test extension to diagnose network proxy and certificate issues.

https://marketplace.visualstudio.com/items?itemName=chrmarti.network-proxy-test

Try an alternative sign in method

If the standard sign in method isn't working, try running the Azure: Sign In with Device Code command which is accessible via the command palette.

Inspect URLs extension tries to access while attempting sign-in

Follow these instructions to install a private build. It includes an unreleased feature that displays a list of URLs that the extension attempts to access so you can properly configure your proxy.

  1. Make sure you're using version 0.11.0 or greater of the Azure Account extension.
  2. Try signing in again.
  3. Open the output window and view the URLs that the extension is attempting to access
Screen Shot 2022-04-01 at 11 37 41 AM
  1. Configure your proxy to whitelist those URLs.
  2. Try signing in again.

File an issue

If the above steps don't work, please file an issue. In your issue, be sure to include the information in the Azure Account Extension's output channel, the sign in error you're getting, and any other information that you think may be useful.