Visual Studio 2017 - How to fix error: We could no

2019-01-25 03:49发布

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?

12条回答
手持菜刀,她持情操
2楼-- · 2019-01-25 03:52

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.

查看更多
手持菜刀,她持情操
3楼-- · 2019-01-25 03:57

I found the same behavior when using Administrator user. Any other user can login and activate the license only for himself. I don't think there is a way to activate for Administrator, which makes using this licensing awkward for usage in a shared resource (i.e. build server).

查看更多
混吃等死
4楼-- · 2019-01-25 03:58

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.

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-01-25 03:59

I have read dozens of posts on this topic discussing clearing out .IdentityService. I tried every variation of this solution that one might think of. None worked.

I ended up poking around and trying to manually login to my Microsoft account using Internet Explorer, but I could not connect to https://login.microsoftonline.com. I added the https://login.microsoftonline.com address to my Trusted Sites in Internet Options. Once I had done this, Visual Studio was able to connect to Microsoft and validate my account.

查看更多
Ridiculous、
6楼-- · 2019-01-25 03:59
  • When an error occurs, Visual studio will log it's error messages in the following folder. Please check the logs located at

    %Temp%\servicehub\logs

  • This can also be caused by network restrictions. Please disable your virus guard or firewall and check.

查看更多
Rolldiameter
7楼-- · 2019-01-25 04:01

What worked for me was to rename .identityservice and then restart VS and log in to your VSTS account. It then recreates a new .identityservice that it can access.

查看更多
登录 后发表回答