How can I switch my signed in user in Visual Studio 2013?

Visual Studio-2013

Visual Studio-2013 Problem Overview


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.

Visual Studio-2013 Solutions


Solution 1 - Visual Studio-2013

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.

Solution 2 - Visual Studio-2013

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.

Solution 3 - Visual Studio-2013

I resolved this problem by deleting the registry key under

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

Solution 4 - Visual Studio-2013

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)

Solution 5 - Visual Studio-2013

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.

Solution 6 - Visual Studio-2013

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

Solution 7 - Visual Studio-2013

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.

Solution 8 - Visual Studio-2013

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

Solution 9 - Visual Studio-2013

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

Solution 10 - Visual Studio-2013

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.

Solution 11 - Visual Studio-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

Solution 12 - Visual Studio-2013

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

Solution 13 - Visual Studio-2013

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.)

Solution 14 - Visual Studio-2013

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

Solution 15 - Visual Studio-2013

what did the trick for me, I just deleted the .vs folder and wallah it start working again.

It's i think a common bug, sometime visual studio stuck on error, although you have fix them too, you just need to remove the .vs code and everything goes back the way it should be.

Solution 16 - Visual Studio-2013

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.

Solution 17 - Visual Studio-2013

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDewi ReesView Question on Stackoverflow
Solution 1 - Visual Studio-2013DerekView Answer on Stackoverflow
Solution 2 - Visual Studio-2013Ambrose LittleView Answer on Stackoverflow
Solution 3 - Visual Studio-2013ionatView Answer on Stackoverflow
Solution 4 - Visual Studio-2013BillKratView Answer on Stackoverflow
Solution 5 - Visual Studio-2013AnthonyView Answer on Stackoverflow
Solution 6 - Visual Studio-2013Basheer AL-MOMANIView Answer on Stackoverflow
Solution 7 - Visual Studio-2013TarunView Answer on Stackoverflow
Solution 8 - Visual Studio-2013Alex StephensView Answer on Stackoverflow
Solution 9 - Visual Studio-2013user2933604View Answer on Stackoverflow
Solution 10 - Visual Studio-2013Y.B.View Answer on Stackoverflow
Solution 11 - Visual Studio-2013ValeraineView Answer on Stackoverflow
Solution 12 - Visual Studio-2013BrianView Answer on Stackoverflow
Solution 13 - Visual Studio-2013ZeeshanView Answer on Stackoverflow
Solution 14 - Visual Studio-2013ggriffView Answer on Stackoverflow
Solution 15 - Visual Studio-2013Muhammad KamranView Answer on Stackoverflow
Solution 16 - Visual Studio-2013DalkeithView Answer on Stackoverflow
Solution 17 - Visual Studio-2013KhashaView Answer on Stackoverflow