A cloud-based identity and access management service for securing user authentication and resource access
The WAM AccountNotFound error indicates Visual Studio is trying to use a cached Windows/Web Account Manager identity that no longer exists or is no longer valid. This typically leads to repeated “Re-enter your credentials” prompts.
Use the following steps to reset the identity state and re-establish sign-in:
- Remove stale work/school accounts from Windows
- Open Settings → Accounts → Access work or school.
- Select any work/school accounts that are no longer needed or are causing confusion and click Disconnect.
- Sign out of Windows and sign back in.
- Clear Visual Studio identity cache
- Close all instances of Visual Studio.
- Navigate to
C:\Users\<UserName>\AppData\Local\\.IdentityService. - If access errors occur, check file/folder permissions. Then delete the file or directory mentioned in any access error messages to reset the identity cache.
- Restart Visual Studio and sign in again when prompted.
- Switch Visual Studio to use the system web browser for auth
- In Visual Studio, go to Tools → Options… → Accounts.
- Under Add and reauthenticate accounts using: select System web browser.
- Sign out of all accounts in Account Settings.
- Add the work/school account again; the system browser will open.
- Complete MFA and, when prompted, choose Yes on the “Stay signed in?” dialog to reduce future prompts.
- Reauthenticate when prompted
- When Visual Studio shows Re-enter your credentials, click it.
- The system browser will open and attempt to refresh credentials.
- If the account is in multiple tenants and some have access issues, deselect problematic tenants in the dialog and continue with the home tenant only.
- Check for WAM-related account issues
If WAM reports that the account is not fully set up or needs re-sign-in, open https://account.microsoft.com/ in a browser and ensure the account is:
- Fully provisioned and verified (email verified).
- Not blocked or suspended. Then sign out and sign back in to Visual Studio.
If repeated prompts persist after these steps, capture the exact AADSTS or WAM error details from the reauthentication dialog and provide them to support or in a Developer Community ticket for further investigation.
References:
- Sign in to Visual Studio with accounts that require multifactor authentication (MFA)
- Errors associated with Web Account Manager (WAM)
- Access multiple accounts associated with the Visual Studio sign-in account
- Signing into Azure Resources in Visual Studio Code when you have multiple microsoft accounts connected to Windows - Microsoft Q&A