i try to login to azure from the visual studio code and i get the same error
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 :
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:
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.
Click on the Account settings in the upper-right and try to re-enter your credentials.
In Cloud Explorer, click on Manage Accounts and remove all accounts, then, relaunch your VS and re-enter your credentials.
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.