Home > Enterprise >  not able to login to azure from visual studio
not able to login to azure from visual studio

Time:03-01

i try to login to azure from the visual studio code and i get the same error

enter image description here

i tried to login , logout , set subscription as well as tenant id for the CLI and it didn't work. i restarted my computer and yet i still getting the same error again when i try to perform :

enter image description here

any suggestions how solve this issue ?

CodePudding user response:

You may get this error if you have registered the application in a one azure AD cloud instance while you are trying to obtain the auth token from a different one.

You can try with the following workarounds:

  1. Try to install the latest version of VS code and Please try using a new browser in incognito mode, or removing Azure URLs from your cache. My guess is that your old login settings might be stored.

  2. Click on the Account settings in the upper-right and try to re-enter your credentials.

  3. In Cloud Explorer, click on Manage Accounts and remove all accounts, then, relaunch your VS and re-enter your credentials.

  4. Enable “System web browser” under Tools > Options > Environment > Accounts > Add and reauthenticate accounts using: dropdown.

Go to ActiveDirectoy in Azure then go to properties you'll see the tenant ID.

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

  • Related