Autodiscover Issue in Outlook Clients in Hybrid Exchange Server Environments

Currently, we are encountering more and more Hybrid Exchange Server environments. Many of these environments are in the process of migration or, for some particular reason, need to maintain a coexistence of on-prem and cloud mailboxes. In t

AI-assisted translation, approved by Mateo.

Currently, we are encountering more and more Hybrid Exchange Server environments. Many of these environments are in the process of migration or, for some particular reason, need to maintain a coexistence of on-prem and cloud mailboxes.

In this case, the issue has the following characteristics:

  • An Outlook client is configured with 2 or more accounts: some in 365 and others on-prem.
  • The on-prem mailbox cannot be configured correctly: there is an issue with a constant credentials pop-up.

This issue occurs because of how Autodiscover works and how the Outlook client "goes out" to look for the connection to Exchange Server. In new versions of Office, Exchange Online takes priority in Autodiscover.

In a hybrid environment where a large portion of mailboxes are in the cloud, there will be no issue with most of them. However, when the mailbox is in Exchange on-prem, Autodiscover will try to validate the credentials in Online and the Autodiscover service runs constantly from the Outlook client. The result is: constant credentials pop-up that prevent the user from carrying out their activities, forcing them to migrate to OWA and contact the HelpDesk.

The initially proposed solution is to migrate mailboxes that work together or are related in the same batch. It is also recommended to migrate mailboxes to Exchange Online as soon as possible and begin decommissioning our local messaging environments.

However, there are environments where coexistence is necessary for some reason. In this scenario, we can reach an intermediate solution by modifying the behavior of the Outlook client through the registry keys indicated in this MS note:

Unexpected Autodiscover behavior if settings under the \Autodiscover key - Outlook | Microsoft Docs

  • PreferLocalXML
  • PreferProvidedEmailInAutoDiscoverAuthPrompts
  • ExcludeHttpRedirect
  • ExcludeHttpsAutoDiscoverDomain
  • ExcludeHttpsRootDomain
  • ExcludeScpLookup
  • ExcludeSrvRecord
  • ExcludeLastKnownGoodURL
  • ExcludeExplicitO365Endpoint

These registry keys must be modified in the following regedit hive: HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\AutoDiscover. Where: 16.0 = Outlook 2016, 15.0 = Outlook 2013.

For the case we are mentioning in this post, we need to modify the behavior regarding credential checking against 365:

  1. Navigate to regedit HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\AutoDiscover.
  2. Create a DWORD registry key ExcludeExplicitO365Endpoint.
  3. Set it to 1.
  4. Restart the Outlook client.
  5. If necessary, restart the computer.

To verify the connection status, we will be able to use the functionality described in the following MS note:

Description of the Connection Status dialog box - Outlook | Microsoft Learn

  1. Keep Ctrl pressed.
  2. Then right-click the Outlook icon in the Windows status bar.
  1. Go to Connection Status...

Thanks for reading. The learning continues in the next article.