You are reading this article because when you attempt to install an IMAP account on Outlook which is connected to or using Office365, you get an error like the one below.
This error appears when you are trying to add non-office365 accounts to a version of Outlook which is connected to Office365.
What Causes this issue?
A recent update by Microsoft to the Outlook 2016 Click2Run version has introduced a functionality change whereby Outlook is prioritising Office 365 for the autodiscover queries above all other autodiscover methods.
This causes problems for customers who aren't using O365 for their mail service (EG: external non O365 accounts like our Exchange Server or Business Mail using IMAP), especially if the user has an unused mailbox within the O365 service, or if the user has a personal O365 subscription using their business email address.
Outlook prompts the user to log in, but logging in will fail as it's effectively requesting credentials to authenticate against the O365 service, rather than the external non O365 credentials.
This behaviour breaks the experience for both existing profiles, and newly created profiles - fortunately, we have discovered a workaround involving a registry fix, for which the steps will be detailed below.
The resolution requires you to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, please ensure that you follow these steps carefully. We highly recommend backing up the registry before you modify it. Please note, we cannot assist in any issues resulting from a misconfiguration, nor can we physically do this for you.
You can run either of the following commands in Command prompt or Powershell.
Note: You must restart the computer after making changes. Any changes to the registry does not take effect without restarting your computer.
reg add HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\AutoDiscover /t REG_DWORD /v ExcludeExplicitO365Endpoint /d 1
Set-ItemProperty -Path “HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover” -Name ‘ExcludeExplicitO365Endpoint’ -Value 1 -Type DWORD –Force
MANUALLY WITH REGEDIT
1. Open regedit.exe from the run or search bar
2. Find this location: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover
3. Create a DWORD (30-bit) value for ExcludeExplicitO365Endpoint and change the value to “1” to enable it.
So you will end up with the setting below.
Below is a part of a thread on the Microsoft support forums.
You can view the full thread here.