Search code examples
visual-studiovisual-studio-2017

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


My email address has changed and now I can't log into Visual Studio 2017.

The error is "We could not refresh the credentials for the account. Failed to refresh the access token".

enter image description here

How can I fix this?


Solution

  • 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.