Jul 29, 2010

How To “Remember My Password” with TFS 2010

If you connect to a TFS server with a machine that isn’t in the same domain then you will typically see something like this:

image

So you click the Use different credentials button to login and get a dialog that looks the this. But wait! Where’s the “Remember my password” checkbox?!

image

It’s not there!  It’s OK, don’t panic. There is a way to avoid entering your credentials every time you want to connect.

In Windows 7 you can use the Credential Manager feature as follows.  Head to the control panel and click the Credential Manager icon.

image

Next click the “Add a Windows credential” link:

image

Then enter your details.  Not that the network address is just the machine name of the TFS server you are connecting to.

image

And you’re done!  Go back to Visual Studio, connect to TFS again and you won’t have any more login prompts.  Yay!

For the Windows XP/Vista users you will need to go to Control Panel -> User Accounts -> Manage your Network Passwords instead.  The UI is a little different, but it should be fairly self-evident..

P.S. For the observant amongst you wondering why my machine is TFS2008-VM when this is a post about TFS2010, it’s because I’m using an upgraded TFS2008 instance.  It’s definitely a TFS2010 machine :-)

17 comments:

  1. It does not work when I enter the information in Windows7

    ReplyDelete
  2. @Anonymous I'm not sure why you're having problems. It definitely works in Windows 7 since that's where all the screen shots are coming from and what I use on a day-to-day basis.
    Perhaps you have a typo in your credentials information?

    ReplyDelete
  3. Tnx, helped me out!

    ReplyDelete
  4. Thanks! I saw this same info on a few different sites but, I'm really glad you wrote this up too.

    I was using the fqdn ("server.example.com") for my TFS server until I read your hint:
    "Then enter your details. Not that the network address is just the machine name of the TFS server you are connecting to."

    So I changed the entry to "server" and it worked!

    Thanks again!

    ReplyDelete
  5. You must insert credentials the same in the "Credential Manager" and in the VS.

    I was entering US\QW1 in the "Credential Manager" and just QW1 in the VS and it didn't work. Then I eneterd US\QW1 in VS and it caught it.

    Spent half hour here.

    ReplyDelete
  6. Thank you so much. I was quite tired of being prompted each and every time I open a new solution!

    ReplyDelete
  7. Doesn't work for me.The problem is, that the incorrect credentials are connecting successfully to the TFS Server in Visual Studio 2012 and I dont know where to change it. Because it connects successfully, it doesn't prompt for new credentials. VS is saving them somewhere? I have done the Windows 7 credential Manager update, and that didn't help..... Perhaps restarting my Machine will help.lol.... aargh....

    ReplyDelete
  8. I'm having a problem where the Credential Manager credentials work for one of my solutions/tfs servers, but not the other.

    I have 2 different solutions, each one using a different TFS server. I have the credentials for each setup in Credential Manager. The first solution works fine, connecting without asking me for my credentials. But when I open the 2nd solution (doesn't matter if the the first solution is open or closed) it always prompts me for my credentials.

    I have checked numerous times to be be sure that I have the credentials setup properly so that is not the cause.

    I should mention that for the one that works the tfs server is in the same domain as the credentials I use. That is not true for the one that is not working. But neither are in the domain that I use for logging into Windows.

    Any ideas?

    ReplyDelete
  9. Just adding this as I forgot to check Notify Me on my last post.

    ReplyDelete
  10. No, I still have the problem. I have to enter my credentials every time I open my 2nd solution file.

    ReplyDelete
  11. Note that if...
    1) The TFS is across your company's network and requires your network password for access, and
    2) Your company requires password changes every so often, and
    3) Your company locked out your network access after several incorrect attempts,
    to remember that your Credentials Manager needs to be updated when you change your network password. If not, the continued attempts made to connect from Visual Studio runs the risk of locking you out of your system.

    ReplyDelete