Share via


Exchange: How does Autodiscover Service work?


What is Autodiscover?

Autodiscover is the one of the exchange feature which is introduced with exchange Server 2007. It helps users to configure the user’s Mailbox automatically.

http://windowstechpro.com/wp-content/uploads/2015/08/12.png

 

http://windowstechpro.com/wp-content/uploads/2015/08/21.pnghttp://windowstechpro.com/wp-content/uploads/2015/08/31.pnghttp://windowstechpro.com/wp-content/uploads/2015/08/4.pnghttp://windowstechpro.com/wp-content/uploads/2015/08/5.png

How does It Work?

Now we will see what is going on behind the scenes of the Autodiscover. During the installation of Exchange Server, Each Exchange Server creates it’s own SCP(Service connection point) which you can see in Active Directory Sites and Services.

http://windowstechpro.com/wp-content/uploads/2015/08/15.png

SCP contains the Exchange server Autodiscover information. It will help outlook clients to locate Autodiscover information to configure user mailbox profile.

In Exchange IIS, You can see autodiscover virtual directory which is available for the auto discover settings.

http://windowstechpro.com/wp-content/uploads/2015/08/16.png

in Exchange PowerShell, Get-Autodiscovervirtualdirectory

http://windowstechpro.com/wp-content/uploads/2015/08/17.png

When outlook client opens, it will send LDAP request to the Active directory.

http://windowstechpro.com/wp-content/uploads/2015/08/autodiscover.png

 

  1. Outlook Client sends LDAP query to Active directory to look for SCP Points.
  2. Active Directory will send the SCP Connection points to the Outlook Client it will be normal XML Response from active directory.
  3. Outlook will sorts the connection points which received from the previous request and sends HTTPS DNS Request to Autodiscover URLHTTPS://autodiscover.windowstechpro.com/Autodiscover/autodiscover.xml. If it fails, it will send http Request toHTTP://autodiscover.windowstechpro.com/Autodiscover/autodiscover.xml. If that also Fails, it will send SRV Request to active directory. even it fails, Outlook will fail completely and thrown an error.
  4. Auto discover will returns with service connection settings to the client which will be XML File with all the connection settings.
  5. Outlook client will take all these configuration information to contact exchange server. Exchange server will check for the appropriate mailbox information for the configuration information provided by the outlook client.

Trace traffic

Now we will see how it is happening for the  outlook which got configured earlier in the article. fiddler is the great tool to trace http traffic. it helps to troubleshoot or trace the autodiscover issue.

1. Outlook Client sends first LDAP Query to domain. It failed

http://windowstechpro.com/wp-content/uploads/2015/08/6.png

2. it sends Autodiscover request to Active directory and it checks the Certificate of the Autodiscover

http://windowstechpro.com/wp-content/uploads/2015/08/7.png

You can there is no Cookies send to the browser.

http://windowstechpro.com/wp-content/uploads/2015/08/8.png

3. Auto Discover sends the outlook settings and configuration information to outlook client.

http://windowstechpro.com/wp-content/uploads/2015/08/9.png It contains the authentication information and also you can see the session cookie passed to the client.

http://windowstechpro.com/wp-content/uploads/2015/08/10.png

it sends all the EXCH,WEB and EXPR information to the Outlook client.

http://windowstechpro.com/wp-content/uploads/2015/08/121.png

4. Outlook takes the configuration information which provided by autodiscover and contacts the Exchange Environment and configures the Mailbox and also downloads the Outlook Offline Address book(OOB) and EWS settings post the successfully outlook profile configuration.

http://windowstechpro.com/wp-content/uploads/2015/08/13.png