The new versions of Outlook 2019/2016/365 have the Direct Connect to Office 365 feature enabled by default. This feature can show an annoying Modern Auth prompt to sign in to Microsoft 365 (Office 365) with a Microsoft account. Even if you’re using Outlook on a domain computer with an on-premises Exchange Server (or even Gmail) mailbox profile configured, your Outlook will periodically prompt you for your Microsoft account credentials. Also, you may have problems sending and receiving emails from Exchange or non-Microsoft mailbox service.
Outlook tries to connect to the Microsoft 365 cloud connection point (Office 365 AutoDiscover) when:
- The
Autodiscover
is not configured/not available for your domain (or the AutoDiscover response was not received for a certain period). Direct Connect is used if other methods of searching your mail server have also failed (URL and SRV record checks); - The connection between your computer and the mailbox server is unstable or blocked by a firewall;
- You have user accounts in Office 365 that are not yet active, but with mailboxes provisioned.
To prevent Outlook from checking the Office 365 connection point (autodiscover-s.outlook.com
and outlook.office365.com
), you need to create two registry parameters:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\office\16.0\outlook\autodiscover DWORD: ExcludeExplicitO365Endpoint Value = 1
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\outlook\autodiscover DWORD: ExcludeExplicitO365Endpoint Value = 1
Use the following commands to create these registry parameters:
reg add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover /t REG_DWORD /v ExcludeExplicitO365Endpoint /d 1
reg add HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\outlook\autodiscover /t REG_DWORD /v ExcludeExplicitO365Endpoint /d 1
Restart Outlook and make sure that the Microsoft account login window no longer appears.