179

I just performed a clean install of Visual Studio 2015 SP3, and I'm getting this in the Output window at startup:

We were unable to automatically populate your Visual Studio Team Services accounts.

The following error was encountered: TF400813: Resource not available for anonymous access. Client authentication required.

I'm not using VSTS at all, nor have I configured any connections to it. (I do, however, have a connection configured to an on-premises TFS instance.)

How may I dispense with this error message? I'd like to instruct Visual Studio to never attempt a connection to VSTS at startup.

Community
  • 1
  • 1
InteXX
  • 6,135
  • 6
  • 43
  • 80

4 Answers4

309

In the top right corner of Visual Studio, you will find a colored box with your name or your initials inside. Click the down arrow and then Account Settings.

In the opening window, please click "Sign out" in the upper left part of the window.

After a restart of Visual Studio and signing back in, the error should be gone.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Basem Sayej
  • 3,374
  • 1
  • 14
  • 12
  • 3
    This made me laugh thanks :) MS has been doing so well! It's kind of cute that you can still sign up for one of their things and it causes errors - just like the old days! :D lolol – Seth Jan 11 '17 at 20:56
  • There's only a 'sign out' option.. looks like another bug.. but I signing out then back in, problem solved! – Leo Gurdian Jan 12 '17 at 22:35
  • 4
    How bizarre. I was already signed in, and obviously the connection was valid when I first created it. But then the fix to this error is to sign out and sign back in. *shrug* It worked, so I won't look into this too deeply and just chalk it up to "Redmond". – JMD Apr 19 '17 at 18:03
  • 2
    I found that in the dropdown there was an "Account settings" option which included a link for "Reenter credentials". Evidently they expire .. – pjc50 Aug 23 '17 at 10:32
  • 2
    This seems to have correlated with my changing my password on our corp network. We auth to MSFT via single-signon. So I'm guessing the token got out of date. Would be nice if VS reprompted to log in. – Sean B Nov 03 '17 at 14:13
  • This is so bazaar. VS 2017 shows me as being logged in. That's why I was confused. If I'm not logged in, then DON'T show me as being logged in. – Rod Jan 06 '18 at 16:01
  • I had to re-enter credentials too, I did not need to sign out first. In fact, it actually has two different login profiles at the same time on the screen. – StayOnTarget Feb 15 '19 at 12:34
  • You're all better off than I. After signing out a few days ago, from that time forward every time I try to sign in VS white-screens and eventually crashes. I've not been able to sign back in for almost a week. GG, MS. – WhozCraig Mar 19 '19 at 01:17
  • 2
    This bug going strong into 2021 – vpetkovic Dec 31 '20 at 14:58
23

You can disable the auto connection on startup via the following steps:

  1. Run "Developer Command Prompt for VS2015" as Administrator.
  2. Run "tfpt connections" command from the developer command prompt.
  3. Uncheck "Automatically reconnect to last server on startup" option and apply the settings.

Note that you will get 'tfpt' is not recognized as an internal or external command, operable program or batch file if you don't have TFS Power Tools installed. You can install them from Microsoft Visual Studio Team Foundation Server 2015 Power Tools.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
0

This solution fixed it for me:

  1. Close Visual Studio
  2. From command line run: del %localappdata%\.IdentityService\SessionTokens.json
Vedran
  • 10,369
  • 5
  • 50
  • 57
0

Similar to the accepted solution, but I didn't have to log out. The solution for me (Visual Studio 2019) was to

  1. click the link to re-authenticate
  2. restart visual studio

After I did that (I clicked the link in #1 several times) then Git integration began to work again.