Streamlining autodiscover
Question asked by Douglas Foster - 1/19/2021 at 1:28 PM
Office 2016 with MAPI requires Autodiscover, and my recent experience has been that autodiscover is slow and unreliable.   If it encounters problems, it often hangs forever, rather than returning errors.    With the help of know-it-all Google, I have found a way to expedite the process.
There are two files involved, an XML file and a registry setting which points to it.   The registry file looks like this:

Windows Registry Editor Version 5.00


The XML file looks like this (and needs to be in the location indicated by the registry file.)

<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">;
    <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">;

Replace example.com in the first file with your domain.   Replace smartermail.example.com in the second file with your server name.   Then place both files in C:\autodiscover on your PC.   Double-click the registry file to load it. then run the normal autodiscover process.    With my domain settings configured for MAPI, IMAP, and SMTP In, I saw these results:
- Outlook 2010 configured with IMAP + SMTP in a few seconds.
- Outlook 2016 configured with MAPI in about 70 seconds.

Obviously, you can put the registry file anywhere, and can be loaded by any method you choose.   
The XML file can be anywhere as long as the registry file points to that location.

Credit to www.virtualdcs.co.uk for this information.

4 Replies

Reply to Thread
echoDreamz Replied
Strange, our Autodiscovery for MAPI takes seconds.
We don't have issue with autodiscover.

Are you sure that your SmarterMail server and your domain DNS records are all correctly configured?
Gabriele Maoret - Head of SysAdmins at SERSIS
Currently manages 6 SmarterMail installations (1 in the cloud for SERSIS which provides services to a few hundred third-party email domains + 5 on-premise for customers who prefer to have their mail server in-house)
Douglas Foster Replied
I found some great articles on the web which explain the Autodiscover search process, and how to control it.   By disabling the unwanted lookups, my Autodiscover process became both speedy and reliable.

AutoDiscover Lookup Process

Office 2016 Autodiscover behavior is controlled by the registry key show below, along with related “Values” and “Data”.    The “Values” do not exist by default, and missing Values are equivalent to 0 (disabled).  A SmarterMail server cannot be located using Office365 or SCP, so I have suggested setting at least those two options to disabled.   Depending on the site, other options may be excludable as well:


This Microsoft article describes the search order in more detail:
The list above and the paragraphs below are arranged to indicate the order that connections are attempted.

Local XML

The device looks for an XML file indicated by a registry key, instead of connecting to a server.
  • Key= [HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Autodiscover]
  • Value="<domain>"
  • Type= Type=Reg_sz
  • Value=<filepath>, such as: "c:\\autodiscover\\autodiscover.xml"
If registry key (dword) "PreferLocalXML"=1, this method will be attempted first.   If it is zero or not present, it is attempted after the HTTPS Autodiscover Domain option fails.

I do not see an option for "Exclude Local XML", since the obvious way to exclude this option is to omit the required registry keys or remove the referenced file.

Last Known Good

The device uses whatever was most recently successful.

This method is disabled if registry entry “ExcludeLastKnownGood” has value 1, but I cannot imagine why that would be desirable.

Office 365

The device tries to connect to Office 365.

This method is disabled if registry entry “ExcludeExplicitO365Endpoint” has value 1.

SCP Lookup

The device searches for Active Directory information.   The necessary fields for SCP could in theory be created with ADSIEDIT, but I have no information about what settings would be needed.   For Exchange environments, this data is apparently configured automatically by the Exchange installation and configuration tools.

This method is disabled if registry entry “ExcludeScpLookup” has value 1.

Https Root Domain

The device tries to connect to

This method is disabled if registry entry “ExcludeHttpsRootDomain” has value 1.

Https Autodiscover Domain

The device tries to connect to

This method is disabled if registry entry “ExcludeHttpsAutodiscoverDomain” has value 1.

HTTP Redirect

This is used for environments with many domains, to avoid the complexity and expense of having a certificate for each supported domain.  The device connects to
                http:// <domain>/autodiscover/
(which does not require a certificate), and is then redirected to
Which allows all domains to use a single certificate issued to <anydomain>.   

This method is disabled if registry entry “ExcludeHttpRedirect” has value 1.

SRV Lookup

Searches DNS for type=SRV, name=_autodiscover._tcp.<domain>, which returns a host and port.   The device then connects to

This method is disabled if registry entry “ExcludeSrvRecord” has value 1.
Douglas Foster Replied
Of course, upgrading also helps.   From the release notes:

Build 7776 (Apr 16, 2021)
Fixed: Autodiscover may not always return MAPI in its response.

Reply to Thread