Visual Studio 2017 - How to fix error: We could not refresh the credentials for the account

This bug will be fixed in a future version.

For now:

  • Close down VS2017
  • Go to "C:\Users\{username}\AppData\Local\.IdentityService"
  • Rename "IdentityServiceAdalCache.cache" as shown below. (for example just add an underscore to it)
  • Restart VS2017 and log in. changing identityservice wile name

NOTE: There are similar issues that this won't resolve, but this worked for me.


Open Visual Studio. Click Help, Send Feedback, Report a Problem...

This brings you to a login screen. If you log in from there, it will log you into Visual Studio.


I tried by deleting only the IdentityServiceAdalCache.cache as in the accepted answer but it did not fix the problem.

For the record, I managed to fix it by deleting every files within the .IdentityService folder (located in C:\Users{username}\AppData\Local.IdentityService).