This post was most recently updated on November 28th, 2021.
2 min read.This article explains one easy workaround to a lot of Visual Studio authentication issues. Personally, it’s helped me multiple times when Cloud Explorer has gotten into a weird authentication loop or Visual Studio stops seeing my MSDN subscription. And it also helps you clean up any old and unused credentials – such as the ones you only used once in 2018 to log into a customer’s Azure environment to debug an issue they had with their AppInsights extension on an app service (and that ended up being Microsoft running v3 of their extension in v2 mode by default, where it’ll crash if it gets more than 10 lines of logging per second. No, I’m not bitter.)
Anyway. What was the issue at hand again?
Problem
There are plenty of situations when Visual Studio might get confused by the different accounts you use for your different workflows and environments. You might get plenty of different symptoms – at worst, you might get locked out of your Visual Studio. A milder case might just bug your Cloud Explorer, like the example shown below.
Gets pretty annoying. But okay – how do we fix this?
Solution
Before taking the steps below, make sure you do actually have your credentials logged in a password manager somewhere. You’ll need to reauthenticate at the end of the process.
Time needed: 10 minutes
How to nuke Identity Cache in Visual Studio?
- Close all instances of Visual Studio
This is quite important because otherwise, you won’t be able to clear the cache as it’s in use.
- Navigate to .IdentityService
Should be pretty simple – fire up your File Explorer and navigate to fire up your File Explorer and navigate to C:\Users\username\AppData\Local\ (where username is your local user name)
- Remove the folder
Go ahead and remove the folder – your Visual Studio will be rebuilding it in a moment anyway.
- Restart Visual Studio – and you should have gotten rid of the accounts!
All good? All good!
And that’s about it for today!
References
- https://social.msdn.microsoft.com/Forums/en-US/27f7787a-6062-49e2-994a-67b55f63637c/where-does-visual-studio-2015-get-credentials-from?forum=visualstudiogeneral
- winget is broken again. - October 1, 2024
- How to fix PowerToys FancyZones in Windows 11? - September 24, 2024
- How to export the whole SSL (or TLS) certificate chain based on the original using PowerShell? - September 17, 2024