Autodiscover Service Architecture
Topic Last Modified: 2009-07-20
The Autodiscover service is a new Web service that is included in Microsoft Exchange Server 2007. The Autodiscover service provides client application configuration information, including external and internal URLs, for Web services, such as Availability and Unified Messaging, that are included in Exchange Web Services. For example, Microsoft Office Outlook 2007 uses the Autodiscover service to discover and configure internal and external URLs for the Exchange 2007 Web services during profile setup and later sessions with the computer that is running Exchange 2007 that has the Client Access server role installed.
Exchange Web Services and Autodiscover
The Autodiscover service automates part of the deployment of Exchange 2007 client applications by providing configuration information that is used to define the service binding in an Exchange Web Services request. This allows for the development of applications that can automatically reconfigure profile settings, which is useful for clients that connect from different locations and domains.
The Autodiscover service can be located by DNS lookup or Active Directory lookup, depending on whether the client is joined to a domain.
The Autodiscover service uses a user's e-mail address or domain account to provide the following configuration information to Exchange Web Services clients:
- The user's display name
- Separate connection settings for internal and external connectivity
To create a robust Exchange Web Services client, you should use the Autodiscover service to check for changes to how the client accesses the Client Access server. For example, if the client moves from the intranet to the Internet, it may have to change configurations to access the Client Access server that hosts Exchange Web Services. When the client can connect to the Client Access server, it can try to retrieve updated configuration information by using the Autodiscover service.
The following figure shows how a client on the intranet can use the Autodiscover service to retrieve the service binding to the Exchange Web Services endpoint.
Using the intranet to retrieve the service binding
The following figure shows how a client on the Internet can use the Autodiscover service to retrieve the service binding to the Exchange Web Services endpoint.
Using the Internet to retrieve the service binding
How the Autodiscover Service Works
When you install the Client Access server role on a computer that is running Exchange 2007, a new virtual directory named Autodiscover is created under the default Web site in Microsoft Internet Information Services (IIS). This virtual directory handles Autodiscover requests from client applications when a new user account is configured or updated, when a user periodically checks for changes to the Exchange Web Services URLs, or when underlying network connection changes occur in the Exchange 2007 messaging environment. Additionally, a new Active Directory directory service object named the service connection point (SCP) is created.
The SCP object contains the authoritative list of Autodiscover service URLs for the forest. You can update the SCP object by using the Set-ClientAccessServer cmdlet.
Before you save the object, make sure that the Authenticated Users account has Read permissions for the object. If users do not have the correct permissions, they will be unable to search for and read items.
When the client connects to Active Directory, it looks for the SCP object that was created during Setup. In deployments that include multiple Client Access servers, an Autodiscover SCP object is created for each Client Access server. The SCP object contains the ServiceBindingInfo attribute that has the fully qualified domain name (FQDN) of the Client Access server in the form of https://CAS01/autodiscover/autodiscover.xml, where CAS01 is the FQDN for the Client Access server. By using the user credentials, the Exchange Web Services client authenticates to Active Directory and searches for the Autodiscover SCP objects. After the client obtains and enumerates the instances of the Autodiscover service, it connects to the first Client Access server in the enumerated list and obtains the profile information in the form of XML data that is needed to connect to the user's mailbox.
The Autodiscover service is also used by Outlook 2007 to retrieve profile information.
An Exchange Web Services client application can use the Autodiscover service to create a dynamically configured application.
Starting with Exchange Server 2007 Service Pack 2 (SP2), if a client requests Autodiscover settings from an Exchange server that has the Client Access server role installed, and the requested user's mailbox is on an Exchange Server 2010 Mailbox server, the Autodiscover service will return a 302 HTTP response with the URL of the Client Access server that can service the request. The client should resend the Autodiscover request to the URL of the Client Access server that can handle the request.