4

Problem: in Visual Studio 2019, I cannot specify a different user to connect to Team Services with that is different than the launching user

  1. I am launching Visual Studio 2019 using my local administrator account domain\admin_user. (This is for remote debugging purposes where I need to run Visual Studio where I require admin privileges).

  2. I want to connect to our source control repository at tfs-server.example.com using domain\nonadmin_user because it has the access to all the project collections.

  3. I successfully connect using Manage Connections "Add Azure DevOps Server" using the address tfs-server.example.com. However I can't find a way to enter specific user account and password to connect to that team project with.

I had this exact configuration working using Visual Studio 2015. However since upgrading to Visual Studio 2019 I cannot make this change.

One thing I will test soon is removing all team project permissions from my launching user so Visual studio will not be able to connect to TFS using the launching account, hopefully I will be prompted at that time to update Credentials for TFS.


What I have tried:

I have tried the accepted answer from Clear stored TFS credentials in Visual Studio 2017 but it didn't work in my case for Visual Studio 2019.

  1. Remove the TFS related credentials from Credential Manager
  2. In Credential Manager add the new updated Generic Credentials for the TFS account. Generally, this would overwrite the cached credentials.
  3. Close all Visual Studio instances, delete %LOCALAPPDATA%.IdentityService as you did.
  4. Clear TFS caches %LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache (in my case I cleared the 8.0 folder)
  5. Clear all the browser caches especially for the stored password (cleared for all installed browsers)
  6. 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.
  7. Run Visual Studio as another user:
  8. cd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE runas /netonly /user: devenv.exe
JukeSpeets
  • 561
  • 5
  • 7

0 Answers0