This is a quick note when Visual Studio 2017 cannot refresh credentials. It usually occurs when you change the microsoft account you use to login to your computer.

Make sure Visual Studio is closed before doing all this

  1. Go to %localappdata%/.IdentityService

  2. Delete IdentityServiceAdalCache.cache (You can also Delete the .IdentityService folder if you like)

  3. Restart computer for good measure if you like

  4. Reenter credentials in Visual Studio ( sometimes you can delete the account first before reentering it again)

All done 🙂