48

I had to change my password for my account which is not the same account i log into my machine with. When connected to the local tfs server, I supplied my password to VS2017 and checked remember password. Now that the password has changed, I cannot connect.

I have tried to remove the tfs in credential manager and also deleted the .IdentityService. Neither have helped. Anyone know if they changed something with VS 2017 and they are cached or stored somewhere else?

AndySousa
  • 1,062
  • 2
  • 15
  • 30

9 Answers9

87

Please try below items to narrow down the issue:

  • Remove the TFS related credentials from Credential Manager
  • In Credential Manager add the new updated Generic Credentials for the TFS account. Generally, this would overwrite the cached credentials.

  • Close all Visual Studio instances, delete %LOCALAPPDATA%\.IdentityService as you did.

  • Clear TFS caches %LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache

  • Clear all the browser caches especially for the stored password

  • Restart Visual Studio > Team Explorer > Manage Connections to check if the Enter credential dialog popup. Just try this several times. Based on my test the dialog will popup the first time, but if you cancel it, then you have to restart VS to popup it again.

  • Run Visual Studio as another user:

    cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE

    runas /netonly /user:<account> devenv.exe

    Enter the user possword, then Team Explorer > Manage Connections

Piyush Balapure
  • 1,023
  • 9
  • 14
Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • I tried the exact steps above, but it didn't solve the problem fully. I have to redo all the steps on each restart of Visual Studio 2017 Enterprise to make it work again. – Péter Bozsó Dec 18 '17 at 10:32
  • 11
    Using the "devenv /resetuserdata" command in the VS Developer Command Prompt as an Administrator solved the problem for me. – Péter Bozsó Dec 18 '17 at 14:41
  • @AndyLi-MSFT - I actually found that it was a bug in VS2017. Updating the the latest point release resolved it. I think it was .2 that it was a known bug... found it in the release notes. It wouldn't prompt user. – AndySousa Feb 06 '18 at 15:33
  • 1
    Only the last step of running as a different user worked for me! – Dinesh Jun 27 '18 at 03:51
  • 1
    All of this except the last step running as a different user did the trick! – Anthony Ryan Jul 21 '18 at 19:02
  • it worked for me after deleting %tmp%, temp, prefetch and %LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache directories – Dilip Apr 08 '19 at 13:10
12

I tried to follow the steps listed in the other answer. But on first step I decided to try just editing the password in credentials manager. It worked for me.

So if anyone else is having the same problem you might want to try that first.

Simme Nilsson
  • 143
  • 1
  • 10
  • not worked for me. I dont see the cached credential in Credential Manager – DLL_Whisperer Feb 05 '18 at 11:28
  • Windows Credentials tab, then under Generic Credentials I have the url for the TFS – Simme Nilsson Feb 06 '18 at 11:58
  • @SimmeNilsson have you updated VS2017 to the latest? I found it was an issue in the earlier versions but since it now prompts me correctly. – AndySousa Feb 06 '18 at 15:33
  • I had Visual Studio 2015 installed on my machine. Tried connect to tfs with 2015 and it prompted for credentials. And that fixed the issue on 2017 version – DLL_Whisperer Feb 07 '18 at 13:03
  • @AndySousa I have 2017 (15.5.6). I can't recall having had this problem before when changing password. But not prompted to change this time. One possible difference might be that I didn't sign out and sign in directly this time but kept on working for a while. But problem remained after reboot that was why I started searching. – Simme Nilsson Feb 07 '18 at 15:29
6

Clear the config from the following path:

C:\users\<user>\AppData\Roaming\Microsoft\VisualStudio\15.0_????\Team Explorer\
katzbatz
  • 332
  • 2
  • 16
A K
  • 61
  • 1
  • 1
1

These Steps worked for the issue : The V2 feed returned an unexpected status code '403 Forbidden' for configured nuGet package through Artifactory

Remove the TFS related credentials from Credential Manager 1)In Credential Manager add the new updated Generic Credentials for the TFS account. 2)Generally, this would overwrite the cached credentials. Close all Visual Studio instances, delete %LOCALAPPDATA%.IdentityService as you did.

Clear TFS caches %LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache

Clear all the browser caches especially for the stored password

Restart Visual Studio > Team Explorer > Manage Connections to check if the Enter credential dialog popup. Just try this several times. Based on my test the dialog will popup the first time, but if you cancel it, then you have to restart VS to popup it again.

Anand
  • 31
  • 1
0

I had face a typical problem with Visual Studio 2017. I was using VSTS. First time i had connected With one credential, later on i was trying to change credential. But it was not taking. Then after a long effort finally i found there have a folder.

C:\Users\ {your user name} \AppData\Local\GitCredentialManager

just delete all the file inside this folder and try. Hope it will work.

Sapnandu
  • 620
  • 7
  • 9
0

I had an issue where TFS kept connecting with the wrong credentials. The solution that worked for me was to run the following command line:

tf vc workspaces /login:MY_USERNAME /collection:http://TFS_SERVER_PATH
Wizou
  • 1,336
  • 13
  • 24
0

In Windows search for Manage Your Network Passwords, from there you can delete and modify saved credentials

Abdurakhmon
  • 2,813
  • 5
  • 20
  • 41
0

In our case, we had to change the user account to log into TFS on the same machine.

None of above solutions did not work for us except changing the computer name.

mhy
  • 1
  • 1
0

Other answers didn't work for me.

Goto File->Account Settings->All Accounts remove the account you want.

MarianoC
  • 31
  • 2