Search code examples
c#visual-studiovisual-studio-2022

Visual Studio 2022 community Sign in Error. How to fix error: We could not refresh the credentials for the account


Environment: Visual Studio 2022 community version

Trying to sign in using my Microsoft account, and met the below notice

"We could not refresh the credentials for the account. The browser-based authentication dialog failed to complete. Reason: the download has failed(the connection was interrupted)"

enter image description here

Can I know how to resolve this? Thanks

Method tried, but does not work:

1 uninstall VS2022 and reinstall

2 delete all folders/files under C:\Users{username}\AppData\Local\Microsoft\VSCommon\OnlineLicensing

3 delete all folder/files C:\Users{username}\AppData\Local.IdentityService


Solution

  • You can try Tools=>Options=>Environment=>Accounts first. Change the embedded web browser to the system web browser.

    enter image description here

    If you've done the above and it still doesn't work, try:

    1. First log in to the official website: https://account.microsoft.com/, and use your original account to log in to your Microsoft account;

    2. After logging in to the home page, open your Microsoft account, display your basic personal information, and find the security option.

    3. Find two-factor authentication in the security interface

    4. Find the passwordless account, open it, and follow the prompts to download the mobile Authenticator.app.

    5. Scan the OR code through your mobile phone and log in successfully.