Skip to content

Cannot Sign in to Azure using new 'Azure Resources' from Visual Studio Code. #1039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Vijay-Koganti opened this issue Feb 10, 2025 · 14 comments
Labels
Milestone

Comments

@Vijay-Koganti
Copy link

I could sign in last week without any issues. Now its a nightmare. I get a popup saying "The extension 'Azure Resources' wants to sign in using Microsoft". I click 'Allow'. It opens a popup. I select 'my windows ID' displayed there and nothing happens. I tried uninstalling the extension, then uninstalling and re-installing Visual Studio Code. Really struggling with this updated 'Azure Resources'. I tried about 20 to 30 different things including opening the Visual Studio Code as 'admin' but nothing works.

@Vijay-Koganti
Copy link
Author

I get an error called 'Unexpected: (pii)'. Please see attached screenshot.

Image

@alexweininger
Copy link
Member

Hi Vijay, VS Code had a major release last week that changed the authentication implementation. Can you confirm what version of VS Code you're using?

See here https://code.visualstudio.com/updates/v1_97#_microsoft-account-now-uses-msal-with-wam-support-on-windows for information on the new implementation. You can try setting the microsoft-authentication.implementation to classic and restarting VS Code. Keep in mind that this setting won't be around for much longer. If we can confirm that this is what's causing the issue then we can forward it to the VS Code team.

@Vijay-Koganti
Copy link
Author

Vijay-Koganti commented Feb 10, 2025 via email

@alexweininger
Copy link
Member

Hi Vijay, could you re-file this issue on the VS Code repository? https://github.com/microsoft/vscode/issues

@Vijay-Koganti
Copy link
Author

Vijay-Koganti commented Feb 11, 2025 via email

@Vijay-Koganti
Copy link
Author

Vijay-Koganti commented Feb 11, 2025 via email

@MCorreia456
Copy link

I had a similar issue. Switching to classic solved my problem as well. Logged my issue here: microsoft/vscode#240439

@alexweininger
Copy link
Member

I had a similar issue. Switching to classic solved my problem as well. Logged my issue here: microsoft/vscode#240439

Thank you!

@yueyuanlucy
Copy link

Hi I also had a similar issue and got stuck on it for 5 hours, like we need to sign in using an incognito window, but the current program does not allow to open the incognito for signing in, which is really not convenient. The only way is to switch to classic option, which will be deprecated soon? Don't know what users can do after that. I think this is really a BIG problem for microsoft or vs code that should be addressed pretty immediately.

@alexweininger
Copy link
Member

Hi I also had a similar issue and got stuck on it for 5 hours, like we need to sign in using an incognito window, but the current program does not allow to open the incognito for signing in, which is really not convenient. The only way is to switch to classic option, which will be deprecated soon? Don't know what users can do after that. I think this is really a BIG problem for microsoft or vs code that should be addressed pretty immediately.

Hi @yueyuanlucy, have you filed an issue on the VS Code repository? If not, please file an issue and detail your situation and they can help. https://github.com/microsoft/vscode/issues

@glloyd2010f
Copy link

Hi Vijay, VS Code had a major release last week that changed the authentication implementation. Can you confirm what version of VS Code you're using?

See here https://code.visualstudio.com/updates/v1_97#_microsoft-account-now-uses-msal-with-wam-support-on-windows for information on the new implementation. You can try setting the microsoft-authentication.implementation to classic and restarting VS Code. Keep in mind that this setting won't be around for much longer. If we can confirm that this is what's causing the issue then we can forward it to the VS Code team.

Was unable to login to any Azure Extension while microsoft-authentication.implementation was set to msal within VSCode. Switch this setting back to classic and everything logged in.

In summary when doing with with the browser window everything worked as expected.

@Vijay-Koganti
Copy link
Author

Vijay-Koganti commented Feb 17, 2025 via email

@mikedice
Copy link

mikedice commented Mar 3, 2025

I agree with one of the posters above. Sign in has become a nightmare in vs code. The MSAL option for sign in does not work. With that enabled I get a very annoying popup that asks me to sign in but when I type in the account name I get red error messages in the same dialog that says my account cannot be accessed. Thats funny, I can access my account from:

  • az login
  • the browser
  • VS Code if I switch MSAL mode back to classic mode

You see those errors and you go down the path of 'gee what did I do wrong?' and waste a couple of precious hours trying to figure it out if you ever get it figured out.

Please disable or remove MSAL mode. It doesn't work.

Version: 1.97.2 (user setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

Sorry, I have a million Azure plugins installed. Maybe the most relevant one is Azure Resources 0.10.6. If you need verison of infor for more let me know

@alexweininger
Copy link
Member

@mikedice Hi Mike, sorry for the troubles. Please file an issue on VS Code https://github.com/microsoft/vscode/issues detailing that it doesn't work with MSAL enabled, and only works with classic mode. cc: @TylerLeonhardt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants