This issue occurs in newer Outlook 365 versions in combination with a on premise Exchange server.
When the outlook client is configured, it sometimes asks to log in with your credentials into a 365 portal even when the email address doesn’t exist in Office 365.
To solve this, we will need to add some registry keys. If your version of outlook is different than 16.0 you should change the value accordingly.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover]
“ExcludeExplicitO365Endpoint”=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover]
“ExcludeLastKnownGoodUrl”=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover]
“ExcludeHttpsRootDomain”=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover]
“ExcludeSrvRecord”=dword:00000001