Freigeben über


some autodiscover fun

I have always loved this feature ever since I first noticed it when diving into Exchange 2007.

For more information about this web service, and how it is used by multiple applications like Microsoft Office Outlook 2007 and later, and the Microsoft Office Communications Server Phone Edition, I would like to refer to this article on MsExchange.Org (Exchange Autodiscover).

In this blog post I just want to highlight how you can change the default behavior of Microsoft Office Outlook when figuring out the Client Access server to connect to use the Autodiscover web service.

Default behavior when launching Microsoft Outlook from a non-domain joined machine (or unable to query Active Directory for the given SMTP address space)

When you launch Microsoft Office Outlook 2007/2010,  Outlook will try to connect to a Client Access server using the given e-mail address. Imagine we want to configure a mailbox with a given e-mailaddress Ilse,VanCriekinge@TestAccount.Com.

Outlook will use the given SMTP Domain of TestAccount.com, and try to reach the Client Access server using the following order:

If this fails, the next try will be:

If this fails, the next try will be a local discover of xml files that may contain information on the Client Access server to be contacted.

  • Local autodiscover for TestAccount.com starting

If this fails, the next try will be a redirect to:

If this fails, the last step will be to locate a service record:

When holding the Ctrl button, and right-click the Outlook icon in the system tray, you can test the Autoconfiguration and troubleshoot Autodiscover configuration settings.

Pic0021

Pic0020

If this fails, Outlook will not be able to connect to a Client Access server in your environment to retrieve the following pieces of information:

  • Exchange 2007
    • Internal/External URL for changing UM Settings
  • Exchange 2007/Exchange 2010
    • Display Name
    • Server Name
    • Internal/External Connection settings
    • Internal/External URL for downloading the Offline Address Book
    • Internal/External URL for setting your Out of Office
    • Internal/External URL for retrieving Free and Busy information
  • Exchange 2010
    • Internal/External URL for Exchange Control Panel to change UM Settings
    • Online Archive settings

Pic0022

 

 

Customizing the default behavior, use local XML

In some cases it might be necessary to change the default behavior or Microsoft Outlook.

An example might be that you have two organizations, sharing the same namespace. Imagine a namespace of ProExchange.Global, shared by both forest A and forest B. When clients login to the domain, they will be services by Active Directory and retrieve the necessary settings. But when trying to launch Microsoft Office Outlook from the outside, there will be one autodiscover record pointing to a Client Access server in Forest A, which won’t help a user from Forest B….

In that situation it might be very useful, if you can help Outlook to query a Client Access server in Forest B directly.

Example situation =

• Situation: Move user x from organization A to organization B.

• Organization A = ProExchange.Global

• Organization B = Sunshine.Edu + ProExchange.Global

• User ivancriekinge has two smtp addresses:

When a user from Organization B,  ivancriekinge logs into to the domain itself, there is no problem, since Active Directory will be queried:

image

image

When a user from Organization A, administrator logs into to domain itself, there is no problem, since Active Directory will be queried

image

When user administrator logs in from a non-domain joined machine, there is no problem, since the service record points to a Client Access server in Organization A.

image

But when user ivancriekinge logs into from a non-domain joined machine, the problem occurs, since the Client Access server in Organization A doesn’t know anything about user ivancriekinge, located in Organization B.

image

image

To make user a Client Access server is queried in Organization B, we can use an XML file, which includes the URL to use!

<?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" >
<Account>
<AccountType>email</AccountType>
<Action>redirectUrl</Action>
<RedirectUrl>
https://autodiscover.sunshine.edu/autodiscover/autodiscover.xml </RedirectUrl>
</Account>
</Response>
</Autodiscover>

image

Then you need to configure the client machine to query that XML file by adding the following registry key:

  • Refer to XML file
  • for Outlook 2007:

HKCU\Software\Microsoft\Office\12.0\Outlook\Autodiscover

  • for Outlook 2010:

HKCU\Software\Microsoft\Office\14.0\Outlook\Autodiscover

STRING_value <your_namespace> = path to XML file

image

HKCU\Software\Microsoft\Office\12.0\Outlook\Autodiscover

  • for Outlook 2010:

HKCU\Software\Microsoft\Office\14.0\Outlook\Autodiscover

DWORD_value, PreferLocalXML = 1

And then it will work :-)

image

 

 

 

 

 

 

 

Any Additional Registry Keys to Use?

Yes :-)

If you don’t want autodiscover to check a few steps, you can include one or more of the following keys.

Outlook 2007:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\AutoDiscover

Outlook 2010:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\AutoDiscover

•"ExcludeHttpRedirect"=dword:0

•"ExcludeHttpsAutodiscoverDomain"=dword:0

•"ExcludeHttpsRootDomain"=dword:0

•"ExcludeScpLookup"=dword:0

•"ExcludeSrvLookup"=dword:0

•"ExcludeSrvRecord"=dword:0

Autodiscover is a wonderful feature! Once configured correctly it will save you quite some time!

Ilse

Comments

  • Anonymous
    January 01, 2003
    regarding the custom xml for autodiscover.  I heard the autodiscover service will also work if there is a mail-user or contact in place, representing a subdomain for user B.  can you comment on this? more: http://outlookliveanswers.com/forums/t/407.aspx

  • Anonymous
    January 01, 2003
    that is correct, as described in the link you provided, the use of the xml file could be a solution in these cases Ilse

  • Anonymous
    February 15, 2011
    I have a client using Win 7 Pro 64bit and Outlook 2010.  The host server is Win 2K, running Exchange 2003.  The autodiscover worked fine until the physical office moved two weeks ago.  The model the company wants is to access the exchange server over the VPN.  IT worked for the last 4 months with the new laptop, now the Wan IP changed and it does not work at all.  The vpn is using a dynip naming so there is no issue, it finds the new Wan IP fine.  The internal network and naming has not changed at all.  I can;t figure this out.  I am also currently waiting for a call back from a major impact tech support and have been waiting over 6 hrs with no call back and 4 follow up calls to try and get an engineer on the phone.  I am pulling my hair out.  Any suggestions would be greatly appreciated!

  • Anonymous
    January 13, 2015
    Sorry for the legacy commenting ! Hopefully my 5 cents can give some additional help to someone.
    Reading over 20 articles, this is by far the best one !
    Our Internal/ExternalUrl is webmail.domain.com. For some reason when our server was setup 6 years ago (Exchange 2007), the Autodiscover path was set to webmail.domain.com/Autodiscover/Autodiscover.xml. The certificate issued only included this name. After going through the above steps, autodiscover worked but I got error 401 like this poor chap:https://social.technet.microsoft.com/forums/exchange/en-US/4630d29f-75d4-4340-bb1b-c19cd130ab30/autodiscover-error-401
    I managed to fix this by when asked for credentials I chose "other user" and used "domainuser" instead of standard "user".

  • Anonymous
    November 12, 2015
    Great post from your hands again. I loved the complete article.
    By the way nice writing style you have. I never felt like boring while reading this article.
    I will come back & read all your posts soon. Regards, Lucy.

  • Anonymous
    December 03, 2015
    The comment has been removed