Share via

Signing into Azure Resources in Visual Studio Code when you have multiple microsoft accounts connected to Windows

Evan Jolliffe 0 Reputation points
2026-02-16T18:15:36.67+00:00

Hi all,

As the title says, I am trying to sign into Azure Resources in my school environment. I have a work account attached to my Windows for obvious reasons.

When trying to sign into said environment I am prompted with my work account and not my school account. Okay no big deal, lets sign in with another account enter my school credentials. It goes through prompts for MFA, I enter my code... it just spins. Try it with my work account goes through instantly.

Okay, lets specify the environment, sign out of my work environment. Click new account, sign in options, sign into an org, enter the domain name, I get the nice banner letting me know it's a valid domain, type in my school username, go to enter my password but wait a second, it's changed back to my work account, that's weird. Try a couple more times no success.

Okay, must be something in my credential vault, go and clear anything out associated with my work account. No success. Clear EVERYTHING out of the credential vault. That's not it.

Go into Windows settings, can't detach my work account from Windows even though my windows account is a local account and not attached to Azure.

Web searches give no insight to help. Gemini AI is clueless. And I'm a sad software developer. :(

Developer technologies | Visual Studio | Extensions
0 comments No comments
{count} votes

Answer recommended by moderator
  1. Evan Jolliffe 0 Reputation points
    2026-02-16T18:42:00.45+00:00

    Okay, I was being dramatic.

    Solution was to go into Settings -> Access work or school and disconnect the accounts from there.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,960 Reputation points Microsoft External Staff
    2026-02-17T11:45:47.2633333+00:00

    Thanks for reaching out! Below are some steps which are helpful for issue

    1. Use “Sign In with Another Account”:
      • In Visual Studio Code, go to the command palette (you can use Ctrl+Shift+P or Cmd+Shift+P on Mac), and type “Azure: Sign In”. Choose the option to sign in with another account and make sure you select your school account.
    2. Account Management:
      • Visual Studio should allow you to manage multiple accounts. You can try signing out completely from the Visual Studio before attempting to log in again with your school credentials.
      • Use Azure: Select Subscriptions in Visual Studio Code to make sure you are targeting the right subscriptions.
    3. Clear Credentials:
      • Since you've already tried clearing credentials in the Windows Credential Manager, ensure that there are no residual entries left. Verify there aren't any settings in the Azure extensions. You might also want to try logging in from an InPrivate or Incognito browser session.
    4. MFA and Device Issues:
      • If you suspect multi-factor authentication (MFA) might be causing trouble, check if there are any specific prompts/approvals needed on the school account outside of Visual Studio.
    5. Check Windows Account Settings:
      • Since you've mentioned not being able to detach your work account from Windows, check if you have administrative rights to make changes to account settings. You can also look into managing accounts directly through Windows to add or modify the necessary permissions.
    6. Microsoft Reach Out:
      • If the issue persists, consider reaching out to your school’s IT department or Microsoft support for more targeted assistance.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.