Forum Discussion

Johan18's avatar
Johan18
Copper Contributor
Oct 14, 2025

Outlook trying to log in to azure servers before mail server

Outlook is connecting to azure servers before trying to log in to the mail server. My mail server blocks access from cloud computing sources. How can I make outlook connect directly to my mail server? I am able to get logged in to a different account with the same mail client.

1 Reply

  • hi Johan18​  This usually happens because newer Outlook builds attempt modern authentication (OAuth) or autodiscover lookups through Microsoft 365 endpoints before connecting to your on-premises or third-party mail server. When your mail server blocks cloud sources, Outlook may appear to “connect to Azure servers first.”

    A few things you can try: [ take backup before you do ]

    Disable modern authentication for that profile (if you’re using basic auth or IMAP/POP):

      • Go to Control Panel → Mail → Email Accounts → Change → More Settings → Security tab.
      • Uncheck “Always prompt for logon credentials” and ensure it’s not configured for modern auth.
      • If it’s Exchange, you may need to force RPC over HTTP instead of MAPI over HTTP.

    Manually configure the account

      • Skip autodiscover and set incoming/outgoing mail server names manually.
      • Disable the “Guess smartly” options by creating the profile from Control Panel → Mail → Show Profiles → Add.

    Registry policy (advanced)

      • You can disable Microsoft 365 autodiscover lookups by adding this registry key:

    o   [HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover]

    o   "ExcludeHttpsAutoDiscoverDomain"=dword:00000001

    o   "ExcludeSrvRecord"=dword:00000001

    o   "ExcludeExplicitO365Endpoint"=dword:00000001

    (Restart Outlook after adding these entries.)

    Test with Outlook Web Access or another client

      • If the second account works fine, compare its connection type under File → Account Settings → Server Settings.

    These steps prevent Outlook from defaulting to Microsoft 365 autodiscover endpoints and force it to connect directly to your configured mail server.

     

Resources