none
How Exchange Autodiscover works

    Question

  • Hello,

    I am trying to understand how exchange 2010 autodiscover service works. I will appreciate if someone can help me in understanding following scanerios

    My domain is example.com and exchange server (all roles+autodiscover service/xml file) are on webmail.example.com. 

    1) I created user's mailbox on exchange server and now starting configuring user outlook 2010. After installation, i started outlook (i am assuming user pc is joined to 
    domain and i am configuring outlook from within my network). I clicked next on "Add an email account" 
    On next page i.e. "Auto Account Setup" all the information is autofilled. Was autodiscover used in this scanerio? 
    2) Exact same scanerio as above except now i have the machine outside of my network and i am configuring outlook for the first time. 
    Will the "Auto account setup" be filled itself again? Will autodiscover service be used? 

    3) Now assume that outlook client is configured and i am outside of my network. When i start my outlook now, will outlook tries to connect autodiscover.example.com or 
    webmail.example.com? I have tried capturing wirehsark packets number of times but looks like it everytime follows the following ( i am assuming no dns entries in cache of pc) 
    1) outlook queries for webmail.example.com 
    2) outlook established SSL session with webmail.example.com 
    3) Bunch of https over rpc calls 

    I tried checking my dns cache but did not find any entries for autodiscover.example.com and wireshark captures also dont show any dns queries or connection establishments 
    with autodiscover.example.com 

    Now if i run the "Test Email Autoconfiguration" wizard, i clearly see http requests made for autodiscover.xml file. 
    Is outlook behavior different from when running "Test Email AutoConfiguration" wizard or am i missing something? 

    Thanks

    Saturday, June 15, 2013 5:29 PM

Answers

  • 1 - No.  This is an LDAP call to a DC.  Autodiscover fires next.

    2. No.  No way to get to a DC, so you have to enter the email address yourself.

    3.  You are blending autodiscover and access to Outlook Anywhere. 

    Depending on what you have setup, it may never use autodiscover.domain.com. Could be a HTTP redirect, hit the domain, could be local XML file etc. 

    in the test-email config what is the server name (full URL) that is returned??  It will *Always* have the autodiscover.xml at the end.  The server name is more informative...


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Sunday, June 16, 2013 1:51 PM
  • 1) Was autodiscover used for internal.

    You can check the internal url set up on cas server autodiscover website

    get-autodiscovervirtualdirectory -id servername | select internalurl,externalurl

    Internal url will be servername/autodiscover/autodiscover.xml

    Externalurl would be webmail.example.com/autodiscover/autodiscover.xml

    2) Will the "Auto account setup" be filled itself again? Will autodiscover service be used?

    if you have A record for autodiscover.domain.com setup for external DNS yes the configuration would be same as internal setup

    3) When client is configured and connected from external, it looks for outlook anywhere configuration and connect over rpc over https, If the outlook anywhere url is different than webmail.example.com, you need to update the exchange proxy settings in advance option in outlook.

    Autodiscover is used for configuring outlook automatically. so once it is setup it check any configuration changes on server and updates automatically.



    Please look at this:

    http://blogs.technet.com/b/rmilne/archive/2013/04/02/busting-the-set-autodiscovervirtualdirectory-myth.aspx

    That VDir is not used for this purpose. 

    For full details take a look at this post

    http://blogs.technet.com/b/rmilne/archive/2011/10/21/exchange-amp-the-autodiscover-web-service.aspx

    That will show you have to change the internal AutoD endpoint using Set-ClientAccessServer


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Sunday, June 16, 2013 1:53 PM
  • Hi,

    Outlook is hard-coded to find autodiscover and it first tries to locate the Autodiscover service by looking up the SCP object in Active Directory.

    Exchange 2007 Autodiscover and certificates:

    http://blogs.technet.com/b/exchange/archive/2007/04/30/3402138.aspx

    White Paper: Exchange 2007 Autodiscover Service:

    http://technet.microsoft.com/en-us/library/bb332063(v=exchg.80).aspx


    Wendy Liu
    TechNet Community Support


    Monday, June 24, 2013 9:05 AM
    Moderator

All replies

  • 1) Was autodiscover used for internal.

    You can check the internal url set up on cas server autodiscover website

    get-autodiscovervirtualdirectory -id servername | select internalurl,externalurl

    Internal url will be servername/autodiscover/autodiscover.xml

    Externalurl would be webmail.example.com/autodiscover/autodiscover.xml

    2) Will the "Auto account setup" be filled itself again? Will autodiscover service be used?

    if you have A record for autodiscover.domain.com setup for external DNS yes the configuration would be same as internal setup

    3) When client is configured and connected from external, it looks for outlook anywhere configuration and connect over rpc over https, If the outlook anywhere url is different than webmail.example.com, you need to update the exchange proxy settings in advance option in outlook.

    Autodiscover is used for configuring outlook automatically. so once it is setup it check any configuration changes on server and updates automatically.



    Saturday, June 15, 2013 5:45 PM
  • 1 - No.  This is an LDAP call to a DC.  Autodiscover fires next.

    2. No.  No way to get to a DC, so you have to enter the email address yourself.

    3.  You are blending autodiscover and access to Outlook Anywhere. 

    Depending on what you have setup, it may never use autodiscover.domain.com. Could be a HTTP redirect, hit the domain, could be local XML file etc. 

    in the test-email config what is the server name (full URL) that is returned??  It will *Always* have the autodiscover.xml at the end.  The server name is more informative...


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Sunday, June 16, 2013 1:51 PM
  • 1) Was autodiscover used for internal.

    You can check the internal url set up on cas server autodiscover website

    get-autodiscovervirtualdirectory -id servername | select internalurl,externalurl

    Internal url will be servername/autodiscover/autodiscover.xml

    Externalurl would be webmail.example.com/autodiscover/autodiscover.xml

    2) Will the "Auto account setup" be filled itself again? Will autodiscover service be used?

    if you have A record for autodiscover.domain.com setup for external DNS yes the configuration would be same as internal setup

    3) When client is configured and connected from external, it looks for outlook anywhere configuration and connect over rpc over https, If the outlook anywhere url is different than webmail.example.com, you need to update the exchange proxy settings in advance option in outlook.

    Autodiscover is used for configuring outlook automatically. so once it is setup it check any configuration changes on server and updates automatically.



    Please look at this:

    http://blogs.technet.com/b/rmilne/archive/2013/04/02/busting-the-set-autodiscovervirtualdirectory-myth.aspx

    That VDir is not used for this purpose. 

    For full details take a look at this post

    http://blogs.technet.com/b/rmilne/archive/2011/10/21/exchange-amp-the-autodiscover-web-service.aspx

    That will show you have to change the internal AutoD endpoint using Set-ClientAccessServer


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Sunday, June 16, 2013 1:53 PM
  • Hi Rhoderick,

    Thanks for the reply. Regarding your point # 3, there is where i am confused.  My assumption is that whenever you are firing your outlook (outside the network), it will always check for autodiscover.example.com/autodiscover.xml but looks like i am wrong.

    Can you give couple of examples when outlook will look for autodiscover i.e. under what scanerios?

    Best Regards

    Monday, June 17, 2013 8:20 PM
  • That's the second entry it looks for first being domain.com/autodiscover.    

    You should see it polling at launch and after an hour, then when cannot resolve name to server. Enable the outlook logging, look at the log file and you will see the activity in the log.


    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Monday, June 17, 2013 8:33 PM
  • Hi Roderick,

    I enabled outlook logging and cannot see outlook polling for autodiscover. There are couple of files that get created in "%Temp%/Outlook logging" but none shows that outlook is querying for autodiscover.

    When i run wireshark and do the email autoconfiguration, i can clearly see http request sent with full url as autodiscover.example.com/autodiscover/autodiscover.xml but this is not seen when i am launching outlook.

    When i check my Microsoft/Outlook folder, there is an autodiscover xml file being created every time i delete it and start outlook.

    Any ideas why the behaviour is different for the two?


    Tuesday, June 18, 2013 12:41 AM
  • Hi

    Autodiscover activity is logged to its own file: %temp%\Olkdisc.log

    Steve

    Tuesday, June 18, 2013 7:05 AM
  • Hi Steve,

    I dont have any Olkdisc.log under temp folder. Only OlkCalLogs which probably are for calendar calls.

    Tuesday, June 18, 2013 4:28 PM
  • What is the exact build of this Outlook client ?

    Cheers,

    Rhoderick

    Microsoft Senior Exchange PFE

    Blog: http://blogs.technet.com/rmilne  Twitter:   LinkedIn:   Facebook:   XING:

    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Tuesday, June 18, 2013 6:23 PM
  • Hi Roerick,

    Its outlook 2013 ( 15.0.4505.1002)

    Thanks

    Tuesday, June 18, 2013 9:54 PM
  • Per exchange technet documentation, once your application (outlook) starts, it should look for contonso.com followed by autodiscover.contonso.com.

    Is there any settings/configurations that will force outlook to look for autodiscover.contonso.com in first place? I am not seeing any dns query being made for contonso.com ?

    Thanks

    Friday, June 21, 2013 5:06 PM
  • Hi,

    Outlook is hard-coded to find autodiscover and it first tries to locate the Autodiscover service by looking up the SCP object in Active Directory.

    Exchange 2007 Autodiscover and certificates:

    http://blogs.technet.com/b/exchange/archive/2007/04/30/3402138.aspx

    White Paper: Exchange 2007 Autodiscover Service:

    http://technet.microsoft.com/en-us/library/bb332063(v=exchg.80).aspx


    Wendy Liu
    TechNet Community Support


    Monday, June 24, 2013 9:05 AM
    Moderator