Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 684
JsAndDotNet Avatar asked Jul 24 '17 08:07

JsAndDotNet


People also ask

How do I re enter credentials in Visual Studio?

Tools -> Options -> Accounts. In the “Add and reauthenticate accounts using:” dropdown, select “System web browser”


1 Answers

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.

like image 126
JsAndDotNet Avatar answered Oct 02 '22 06:10

JsAndDotNet