Solution to Visual Studio 'Re-enter Credentials' and multiple authentication prompts

I’m using Visual Studio 2021 Preview 2.1 and I was constantly getting prompted to re-enter my credentials multiple times. I would have to 2FA 3-4 times everytime I wanted to do something with Azure.

I phoned a friend and he said I’m seeing that because I have multiple tenants that use 2FA.

For some reason if you have that the “embedded browser auth” method doesn’t work well.

Instead you need to use the system browser.

If you are have auth issues and are being asked to re-enter your credentials, then try this:

  1. Tools -> Options -> Accounts
  2. In the “Add and reauthenticate accounts using:” dropdown, select “System web browser”
  3. Sign out, then sign back in.
  4. Restart Visual Studio

Tools Options Dialog

You can find more info here:

How to use Visual Studio with accounts that require multi-factor authentication