How to Fix “Could Not Find a WAM Account” in Visual Studio 2022

There are not many things that are more annoying to start your day than this message in Visual Studio 2022:

Visual Studio is unable to sign you in and claims that the WAM account could not be found.

Nothing changed in my account, nothing changed in the infrastructure, yet here we are, and Visual Studio can no longer find our account. Without that account, we cannot access the company NuGet feed, then that uses this account for the authentication.

Should this happen, open Visual Studio without code, go to Tools / Options and select the Accounts section. In the select box for “Add and reauthenticate accounts using” we change the current value to “System web browser“:

Set the method for adding and reauthentication to the system web browser.

After that, you can go back to your user icon at the right top corner, click on sign-in and your system browser should pop up to ask for your login credentials. After we add our credentials in the browser, Visual Studio should finally be able to find our account and fix the permissions.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.