Can't sign out of TFS in Visual Studio 2017 - visual-studio

I am trying to sign out of TFS from Visual Studio 2017. I am connected to two VSTS online accounts. Here are the lists of the things I did:
Removing my username from Visual Studio => Help => Register Product => All Accounts
Deleting the entire entries in Credential Manager (all items from Web and Windows)
Removing entries from TeamExplorer.config
Using Team => Disconnect from Team Foundation Server
And when I open Visual Studio, one VSTS account is still accessible, while the other is not. It's so frustrating and imposes an important security threat. Even using Connection Manager windows from Team Explorer I can see that no account exists there and no TFS URL is listed there. But I can still do everything with one of my accounts.
Any ideas to help me sign out?
Update: I don't login anywhere, but this entry keeps coming back in Credential Manager:

If it is VSTS account, you should be able to sign out by the steps below:
Click on your profile in the up-right corner of VS.
Click "Account Settings".
Remove the credential that you have already signed in.
And you can also clear the .IdentityService folder under %localappdata%. VS2017 stores VSTS Account credential there.

Related

Cannot Add GitHub Account from Visual Studio 2022 Account Settings

I have just upgraded from Visual Studio 2019 to Visual Studio 2022 and I have encountered a strange problem. When going to File -> Account Settings..., under "All Accounts" I used to have both my Microsoft account (which is also my Personalization Account) and my GitHub account. In VS 2019, there was no issue adding the GitHub account, but I have not been successful in VS 2022. When I select +Add▾ then GitHub/GitHub Account, the Connect to GitHub dialog pops up asing me to Sign In to either GitHub or GitHub Enterprise. Since my account is GitHub and not GitHub Enterprise, the only sign in option listed is "Sign in with your browser".
When I select Sign in with your browser, I get redirected to https://visualstudio.microsoft.com/vs/github-signed-in/ and I get the message "Success! Your authorization was successful. You can now return to Visual Studio."
The expected result at that point would be to see my GitHub account listed under All Accounts, but I do not. The other expected result would be to see Visual Studio listed in my GitHub account under Authorized OAuth Apps, and I do see it there, so it does look like the authorization was successful. As well, I can access repositories without issue, so it looks like the problem is inside Visual Studio 2022.
Has anyone else experienced this issue? Is this a known issue that Microsoft is working on?
EDIT: I found this on the Microsoft Docs, which lays out the steps I was following. Under Adding public GitHub Accounts, I get to Step 3 ok, but then at Step 4, I do not get the expected result.
I've also found out this is preventing me from creating a new repository from VS, or opening a repository directly from VS. I can still work with local repositories cloned via GitHub Desktop, but that's about it.
Very annoying.
This worked for me:
Open ‘Account options’(Click ‘Account options’ in account settings page or navigate to tools > Options > Environment > Accounts) and check ‘Include GitHub Enterprise Server accounts’ checkbox, then click on “Re-enter your credentials” again and check if you still unable to sign in to GitHub enterprise account?
https://developercommunity.visualstudio.com/t/unable-to-sign-in-to-github-enterprise-account-in/1460790#T-N1465373
I had a suspicion that this was related to some type of settings cache or potentially some type of previous Git setting. After wiping out all of my Visual Studio settings and re-setting to factory defaults (which is another annoyance) using the following commands, it started working for me:
devenv.exe /ResetSettings
devenv.exe /ResetUserData
When I clicked Manage Connections, the GitHub option wasn't available in the usual spot. Only the Microsoft Sign on. I found another spot to connect to GitHub;
Open the Team Explorer (View -> Team Explorer).
Click the Connect | Offline drop down from the top of the explorer.
Projects -> New Repository
Under Create a new GitHub repository select Add an account under the account field to open up the sign on page for GitHub.

Visual Studio - Publish Web App to Azure "Reenter your credentials" does not work

I can't publish an asp.net app to Azure Web App in Visual Studio 2015. It asks me to reenter my credentials, which I do, and then get the same "renter your credentials" screen.
I have two Azure accounts, one is my synced Azure AD identity (account#company.com), and the other as a cloud-only identity (account#company.onmicrosoft.com). When trying to log in with either of these accounts, Visual Studio still says "Reenter your credentials" and does not show any subscriptions or resource groups.
Looking at a Fiddler, I can see Azure return a list of all of my subscriptions, yet Visual Studio does not populate and thinks my credentials are invalid (Fiddler screenshot below)
I had the same problem
In the Acount settings of your visual studio top right..
Delete all acounts an then sign in with the proper azure account.
Then when you go to publish you can add the account
I have experienced exactly what you describe here, however when I ensured that I was connected to Visual Studio using the same account as I wished to publish with, the "reenter credentials" message disappeared.
Go to Options > Accounts,
On the "Add and reauthenticate accounts using:" field select Device code .
Login in the browser with the provided code and then you are able to publish without re-entering credentials.
I had this issue with visual studio 2019, my Microsoft account was linked with my gitHub account. I unlinked my github account by logging into my windows account going into security and unlinking the account
Same issue here with VS 2019 and 2022 (preview), but the account settings in Visual Studio only showed my 'Home Organization'. Deleting and re-adding didn't help.
Finally, I fixed it by removing an external organization that I was a member of from my account.
Go to https://myaccount.microsoft.com and login. On the left panel, select Organizations and delete all, except your Home Organization.
Of course, if you actually need the external organization(s), this isn't going to help you.

Visual Studio can't switch accounts when connecting to Team Foundation Server

I have different accounts with different VSO subscriptions. I'm trying to connect to a different account (from the one I'm logged in VS-2015) so that I can check in code in the repository that I have in that account. But when trying this, Visual Studio brings me to the profile website, from which is basically a dead end - what am I supposed to do from there?
The "Connect to Team Foundation Server screen sometimes just freezes after authentication, and doesn't go anywhere from there.
So clearing the settings file, which is named CurrentSettings usually in the folder C:\Users\your user name \Documents\Visual Studio 2015\Settings (Windows) - helped get passed this issue.
Also, when you are brought to the VSO Profile page (the one I showed in my picture question) you have to select the project you are trying to open.

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

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