Automate TFS logon from Visual Studio - visual-studio

My main domain account does not have local admin privileges and I start Visual Studio using RunAs and another account that has local admin privileges.
Our Team Foundation Server (2008) is configures to recognise the main domain accounts not the local admin accounts. This means I have to log into TFS after starting VS with the admin account. Note that TFS is on our domain and it's VS that is prompting for credentials.
Is there any way I can automate the logon to TFS to use my main domain account?

Pro tip: Log into the TFS server's website with IE. Check remember password. Now it will remember it from VS :)

I would suggest that either you have the local-admin-wielding account added to TFS (if it isn't a shared account, that is), or you log in as local admin, and add your main domain account to local administrators. It's either that, or you'll need to log in to TFS every time, I believe.
Also, it's not Visual Studio that is prompting you for credentials, it is Team Foundation Server. Basically, when TFS tries to make the connection to TFS, it tries to log on with your current network credentials. If that doesn't work, it will bring up the appropriate dialog(s) to prompt for user id and password.

Have you tried
http://runas-professional.software.informer.com/

Login to the machine as the administrative user.
Then either login to the TFS webserver, or (on win7) go to:
Control Panel -> User Accounts -> User Accounts -> Manage you credentials
add the information here.

Related

Get prompt for entering Credentials which Attaching Process in Visual Studio 2012

While I am attaching to a process for remote debugging in Visual Studio 2012, it uses my default system credentials. I want the debugging to be done in context of other user, for which I should get a prompt to enter new credentials. What settings/configuration I need so that I get that prompt for inputting credentials?
I tried clearing all the passwords stored in Windows Credential Manager and tweaking some settings in VS but it did not work.
Faced the same problem with Visual Studio Remote Debugger 2019 (x64). Starting the Remote Debugger with "allow" username command parameter for user who start VS2019 and attach to the remote process helped me.
"C:\Tools\Remote Debugger 2019\x64\msvsmon.exe" /allow username
You can see more info here on how to set up remote tools: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx
Gregg's blog is very useful for account requirements: http://blogs.msdn.com/b/greggm/archive/2008/05/15/visual-studio-remote-debugger-service-user-account-requirements.aspx
You really want two local user accounts, one on host and remote host, with the same username and password (to have Visual Studio authenticate using a local account that matches a remote account (username and password) that has been given permissions to debug in msvsmon.exe)
About Windows cached credentials - if you accessed a resource and checked “remember me”, Windows cached credentials to that resource. If you ever attempted to Attach To Process using the current user logged into the local machine, Visual Studio will pick up these cached credentials and attempt to use this as authentication for remote debugging.So you’ll need to clear these credentials (control userpasswords2, Advanced tab, Manage Passwords, Delete the credentials for that remote host)
Now you can either attempt to access the resource (like a share) using a different credential and store it, or you can run Visual Studio as that user you want to debug with that corresponds to the user on the remote side.

How to change the defaut account to link to tfs?

In VS2010 when I cick connect to team foundation server, it asked an account and password for the first time, but then it will use the default account.Now, I want to change the default account, how could I do it? By the way, my os is xp. Thank you!
Right-click on VSTS and select "Run as different user" give the credentials and then connect to TFS.
These resources may help you:
How to Connect VisualStudio 2010 to TFS
Change logged in user
Automatically connect to TFS under another user account

TFS/Visual studio 2010: Clear cached password for TFS in Visual Studio 2010, Need it to ask me to login again

I am using Windows 7 and i installed TFS Server and connected to it from my VS 2010 install. It prompted me for a password so I entered the admin password.
All went well, now i added myself as a user but i can't get it to ask me to login again. It is remembering (caching) the password. Hence it always logs me in as Administrator.
I search the Internet and some people recommend ClearCred.exe which ships with VS SDK but it doesn't anymore ...
And then checking the managed credentials in windows 7, i have also checked this and i see nothing with regards to my cached TFS password.
I also tried removing the TFS server connection from VS 2010 and readding it .. but it remembers me as Administrator.
Can anyone help?
Open the Start Menu and type "Manage Network Passwords" and open the control panel applet that shows up in the results. Then, you should see the credentials in the list where you can expand the item and "Remove from vault."
You need to remove TFS credentials from Windows Vault to clear and force to ask new TFS credentials in Visual Studio
Go to Control Panel (Start -> Control Panel).
Click User Accounts ( or User Accounts and Family Safety->User Accounts in Windows 7 Machine)
Click Credential Manager (or Manage your credentials)
In Credential Manager page, you can see the two type of credentials
i. Windows Credentials
ii. Generic Credentials
Click on two credentials modify link, click the link Remove from vault to remove stored TFS credentials.
Now, When you login into Visual Studio you will be asked to give credentials to connect TFS.
Note: Don't forgot to uncheck the option Remember my credentials to force to ask credentials for every TFS connections.
I had the same problem and after much googling found this link which fixed my problem i hope it works for you aswell.
http://www.richard-banks.org/2010/07/how-to-remember-my-password-with-tfs.html

Clear remembered passwords in `Team Explorer` pane in Visual Studio 2010 SP1

Every time I open Team Explorer pane in Visual Studio 2010 SP1, it automatically log in with some certain remembered account which I don't want to.
I'm looking for way to remove the remembered stuff.
Please help!
Nam.
Team Explorer uses standard Windows authentication techniques to authenticate to Team Foundation Server. If there are Windows Credentials stored in Credential Manager, it will use those to authenticate. If not, it will use your domain credentials.
So, check Credential Manager: Control Panel > User Accounts > Credential Manager. If there are Windows Credentials stored there for your TFS server, removing them will begin authenticating you with your logged-in credentials. If you want to override this behavior, add new credentials there.

Visual Studio can't remember my account information for CodePlex TFS

I'm running Visual Studio 2010 Ultimate, and I'm working on a project hosted on CodePlex to which I connect through TFS. Each time I open the solution, VS prompts me for the account information.
Is there any way I can make VS remember my credentials, so I don't have to enter them each time?
This is currently the only project on TFS I'm working on, but to be future-proof I'd like to save the credentials on solution-level, so I can work on other projects on other TFS servers and have those accounts saved as well.
Use the Windows 7 Credentials Manager to store your login credentials to the site.
Go to Control Panel -> User Accounts and Family Safety -> Credentials Manager -> Add Windows Credential and enter the address and your credentials as following:

Resources