You can't switch between different organizational accounts in Visual Studio Online


When you use Visual Studio Online accounts that are linked to directory tenants, such as accounts that are created from the Microsoft Azure Preview Portal, the sign-out function may not work as expected. For example, you can't switch between different organizational accounts to connect to multiple accounts that are linked to directory tenants.

When this problem occurs, you see a flashing blank sign in dialog box several times. Then, you receive the following error message after you connect to or add a new connection in "Connect to Team Foundation Server" dialog box:

TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server
TF31002: Unable to connect to this Team foundation Server


To resolve this problem, apply Visual Studio 2013 Update 2 or a later version of the update. To do this, go to the Visual Studio download



To work around this problem, delete your browser cookies. To do this, use one of the following methods.

Note This workaround will sign you out of all Visual Studio Online accounts and it will delete cookies that customize your browser experience. This might affect your web-browsing experience.

Method 1
  1. Exit Visual Studio.
  2. Delete your Internet Explorer browser cookies, website data, and passwords.
  3. Close all Internet Explorer browser windows.
  4. Start Visual Studio, and then reestablish your Visual Studio Online account connection.

Method 2
  1. Exit Visual Studio and all Internet Explorer browser windows.
  2. Locate and then manually delete the contents of your browser cookie cache. To do this, type the following command in the Run dialog box, and then click OK:


    The default locations are as follows.

    Windows XP

    C:\Documents and Settings\username\Cookies

    Windows Vista and Windows 7


    C:\Users\username\AppData\Roaming \Microsoft\Windows\Cookies\Low

    Windows 8 and Windows 8.1

    C:\Users\username \AppData\Local\Microsoft\Windows\INetCookies
  3. Start Visual Studio, and then reestablish your Visual Studio Online account connection.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

Team Explorer in Visual Studio includes a feature that remembers last-used credentials. Therefore, you don't have to re-enter these credentials when you add new Visual Studio Online connections through the Connect to Team Foundation Server dialog box in Visual Studio.

When you use multiple Microsoft account credentials that connect to the same or multiple Visual Studio Online accounts, you can use the sign-out function in the Connect to Team Foundation Server dialog box to make Visual Studio forget the currently signed-in user. This lets you connect to a Visual Studio Online account that uses a different Microsoft account.

ID articolo: 2958966 - Ultima revisione: 22 set 2014 - Revisione: 1