[visual-studio-2013] How can I switch my signed in user in Visual Studio 2013?

A new feature of Visual Studio 2013 is the ability to sign in with a Microsoft Account and have your settings be persisted across all of your instances of Visual Studio, amongst other things.

When I installed Visual Studio 2013 Preview I signed in with one of several Microsoft Accounts I hold.

I've now installed the RTM version of Visual Studio 2013 (after uninstalling the Preview version) and that has kept my previous user sign in credentials.

I would now like to change these sign in credentials to be a different Microsoft Account but every time I attempt to sign in with the new details I receive a message similar to the following

We were unable to establish the connection because it is configured for user [email protected] but you attempted to connect using user [email protected]. To connect as a different user perform a switch user operation. To connect with the configured identity just attempt the last operation again.

The problem is I can't find any documentation anywhere on how to perform a "switch user operation". Maybe I'm just not looking hard enough but hopefully someone here can help me out.

This question is related to visual-studio-2013

The answer is


There is a comment about this under this answer, but I think it's important to list it here. If you want to preserve your settings, export them first because they will be lost.

From MSDN forums - since I had to hunt around far too much to find the solution to this:

  1. Close Visual Studio
  2. Start the Developer Command prompt installed with Visual Studio as an administrator.
  3. type 'devenv /resetuserdata' ('wdexpress /resetuserdata' for Express SKUs)
  4. Start Visual Studio Normally.

Worked for me.


Thanks.. only one that fixed mine was the command prompt. Devenv is located under VisualStudio 12.0 Directory under common7\IDE if it helps..


For VS 2013, community edition, you have to delete the registry keys found under: hkey_current_user\software\Microsoft\VSCommon\12.0\clientservices\tokenstorge\visualstudio\ideuser


If the Command prompt don't work for you, try logging in with your account that is working then log out and then try again with your other account.


Derek's answer above didn't work for me. I am using VS 2013 Ultimate and after signing out of Visual Studio, when i tried to sign in as another user, it gave error.

Then when connecting to the Team Project i saw the option to switch user, which is what i wanted all along.


For Visual Studio 2019 it wasn't working by signing out/ signing in, etc. as mention in other solutions. What simply worked was performing the operation from new branches window/section. i.e,

1. Click on:

Git Changes interface

2. It opens up the branches section as below. Then right click on desired branch and perform the operation which wasn't working earlier. (for me, it was PUSH that wasn't throwing this error) new branching interface in VS2019 upgrade

(in VS 2019 new Git interface, I usually push/pull/fetch from the small arrows as shown in first screenshot. But sometime they throw error (mentioned in question) and do not allow pushing/pulling. What then what worked was the solution I mentioned above. May be it's a bug or something, but this solution saves you from resetting user data, and mess of signing out/in from multiple accounts, etc.)


I faced this issue Many time from different scenarios

one of them when I tryed Connecting to team foundation server for different Logged User

enter image description here

so the solution is easy Just Click Switch User

hope this help you


You don't need to reset all your user data to switch users. Try clicking on your name in the upper right corner then click on "Account settings". There you will get an option to sign out of the IDE. Once signed out you can sign back in as another Microsoft account.


Start Visual Studio Tools -> Import and Export Settings -> Export selected environment settings You need to be really quick to navigate the menu before Licensing pop-up appears, (this step is optional: worst case scenario you would have to restore all the settings manually). Once in "Import and Export Settings" dialogue you can relax.

Exit Visual Studio.

From the command prompt run: devenv /resetuserdata for the particular Visual Studio version.

Safest way is to right-click on the shortcut -> Properties -> Shortcut -> Target -> copy. Final command should look something like:

"C:\Program Files (x86)\Microsoft Visual Studio NN.N\Common7\IDE\devenv.exe" /resetuserdata

Go through log-in and initial settings.

Tools -> Import and Export Settings -> Import selected environment settings to restore your original settings.

This worked when the error:

We were unable to establish the connection because it is configured for user email@address but you attempted to connect using user email@address. To connect as a different user perform a switch user operation. To connect with the configured identity just attempt the last operation again.

...has both instances of email@address identical.


Execute VSWinExpress /resetuserdata, located in C:\Program Files (x86)\Microsoft Visual Studio 12.0, to reset the user credentials for Visual Studio 2013 Express.


I was also able to fix this by signing in putting my product key in and then signing out and then logging in under my new login.


I was able to fix this by: 1) Sign in as the old user. 2) Sign out. 3) Sign in as new user.

In my case, it appears that it wanted to verify my license on the old account first, before it would let me switch to a new one.


None of the above worked for me - the following did:

devenv /ResetSettings

The nice thing about this option was it didn't wipe out all of my Visual Studio configuration (as /ResetUserData does)


I resolved this problem by deleting the registry key under

hkey_current_user\software\Microsoft\VSCommon\12.0\clientservices\tokenstorage\visualstudio\ideuser


There is a link: Licence with another account...(before trying to Sign in). Click and sign in, then close the Sign In Window.
(Ultimate 2013)


I have Visual Studio 2013 Express. I had to delete the registry key under:

hkey_current_user\software\Microsoft\VSCommon\12.\clientservices\tokenstorge\VWDExpress\ideuser

what worked for me was to go to Team explorer in VS2013 and under 'connect' you'll see a link saying 'select team projects'. click this and a window opens asking you to select the project but in the bottom left corner of this window there is a (switch user) link, just click this and use your new id. simple