Client authentication error when starting Visual Studio 2015 SP3
Visual Studio-2015Azure DevopsVisual Studio-2015 Problem Overview
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.
Visual Studio-2015 Solutions
Solution 1 - Visual Studio-2015
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.
Solution 2 - Visual Studio-2015
You can disable the auto connection on startup via the following steps:
- Run "Developer Command Prompt for VS2015" as Administrator.
- Run "tfpt connections" command from the developer command prompt.
- 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.
Solution 3 - Visual Studio-2015
This solution fixed it for me:
- Close Visual Studio
- From command line run:
del %localappdata%\.IdentityService\SessionTokens.json
Solution 4 - Visual Studio-2015
Similar to the accepted solution, but I didn't have to log out. The solution for me (Visual Studio 2019) was to
- click the link to re-authenticate
- restart visual studio
After I did that (I clicked the link in #1 several times) then Git integration began to work again.