Fixing broken app passwords with Microsoft Outlook

I have two Exchange-hosted accounts with 2FA enabled that for some reason never work properly with Microsoft Outlook. They don’t get detected as 2FA and prompt for a regular username/password combination, and my normal password doesn’t work.

The solution is an app password, but if you’re reading this blog post you already know what happens. Since you already tried logging in with the regular username/password your app password doesn’t work. At all. No matter how many times you put it in the dialog box Outlook just prompts you again.

Here’s how to fix it.

  1. Remove all entries for the offending account from the Accounts control panel in Windows. Check on both the Email & Accounts page and the Access work or school page
  2. Remove all entries for the offending account from Credentials Manager on the Windows Credentials tab. Make sure to check everything, not just ones where the account name is visible in the list. In my case there was an outlook.office365.com item in the list that, when expanded, showed it was attached to the offending email address.
  3. Remove all entries for the offending account from the registry. Use regedit to do a find for the email address and delete all the keys that use it. I removed the associated entries under these two keys, but there may be others:
    • Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\Identities
    • Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\DocToIdMapping
  4. Obtain a new app password and save it to a text file on your computer somewhere.
  5. REBOOT YOUR COMPUTER. It seems pointless but this is a critical step. Somehow Outlook caches one or more of the pieces of information that you deleted in earlier steps and a reboot must be done to clear out that cached information.
  6. Run Outlook, add a new account selecting the manual configuration option, and then Exchange as the server type.
  7. Enter your app password from the text file.

Then it will work. It boggles my mind that it’s 2022 and this is still broken (I’ve had this issue as far back as 2016).