다음을 통해 공유


Autodiscover Service playing major role in Lync and Outlook.

Recently someone asked me about how Lync client and Outlook client access the availability information like, OOO, Calendar, and Contacts etc. I told them it will be available through Exchange Web Services.  However without knowing Autodiscover you will understand the EWS

 

Basically Lync, Lync Phone edition, Outlook using Autodiscover to locate Exchange Web Services (EWS).

 

It is very much necessary to understand the Autodiscover. Without Autodiscover you cannot locate web services, Autodiscover is offered by Client Access Server.

 

The Autodiscover service is used to provide client applications internal and external URLs for accessing information offered by EWS.  When you install the Client Access Server role on a computer that is running Exchange Server 2010, a new virtual directory named Autodiscover is created under the default website in Internet Information Services (IIS). 

 

 

Both the Outlook client and the Lync client use the Autodiscover feature of Microsoft Exchange to locate EWS within a given environment.  However, there is a significant difference in the way each client searches for EWS, and this difference can impact the conversation environment feature within Lync.

 

While Exchange Server 2010 supports both WSSecurity-based and -SOAP/XML-based Autodiscover client requests but Exchange Server 2007 supports only legacy XML-based requests.

 Upon resolving the Autodiscover URL by using Domain Name System (DNS), the Lync client will send an initial unauthenticated ‘dummy’ request to the Autodiscover URL. Using the information contained in the 401 response, the Lync client will detect whether the Autodiscover server is configured to support either WSSecurity or SOAP/XML requests. 

 

If the Autodiscover server only supports SOAP/XML requests, the Lync client will replace “.xml” in the Autodiscover URL with “.svc” and use it as the Autodiscover service URL (for example, “https://autodiscover.mydomain.com/autodiscover/autodiscover.svc”).  Lync will then construct a SOAP request and send it to the Autodiscover server to retrieve the internal and external EWS URLs.

 

Lync Client and Devices

UC clients such as Lync and UC devices such as the Microsoft Lync 2010 Phone Edition for Aastra 6721ip or Microsoft Lync 2010 Phone Edition for Polycom CX600 also use Autodiscover to locate several Microsoft Exchange web service URLs.  UC clients and devices will only use the DNS-based discovery method.  The Autodiscover process is initiated one minute after the client successfully authenticates to a Lync Registrar server

The following logic is used by UC clients and devices to locate Exchange Web Services within a Microsoft Exchange environment. 

Internal and External Networks

1.    UC client will attempt to read any existing Autodiscover data with a valid Time-to-Live (TTL), which may have been previously retrieved by Outlook.

2.    UC client or device will extract the SMTP domain from the user’s presence document.

3.    UC client or device will then use the user’s SMTP domain to construct DNS queries for the following URLs:

·       https://<smtpdomain>/autodiscover/autodiscover.xml

·       https://autodiscover.<smtpdomain>/autodiscover/autodiscover.xml

·       http://autodiscover.<smtpdomain>/autodiscover/autodiscover.xml

·       Autodiscover SRV record

 

4.    UC client or device will send unauthenticated GET to above Autodiscover URLs to determine whether server is running Exchange Server 2007 (X-SOAP-Enabled) or Exchange Server 2010 (X-WSSecurity-Enabled).

5.    A new SOAP or XML request is sent to retrieve EWS information, which is then cached in the Registry with a default TTL value of 24 hours.

6.    In the event of Autodiscover failure, retries will occur as follows:

·       If Autodiscover fails, retry on a three-minute interval over a period of two hours.

·       If Autodiscover fails after three successive attempts, use MAPI but continue to retry.

·       If Autodiscovery succeeds, refresh cached values on an hourly basis.

Outlook Client

During setup, each Client Access Server is assigned a ServiceBindingInfo attribute that is populated with an Autodiscover URL in the form of https://{ServerName}/autodiscover/autodiscover.xml.   These Service Connection Points (SCPs) are used to locate Microsoft Exchange services whenever a new mail profile is created using Outlook. 

Internal Network

1.    Outlook will query for the Service Connection Point object, which is defined on each Client Access Server in AD DS.

2.    If for some reason the SCP object cannot be retrieved, or if the SCP is unavailable, Outlook will extract the SMTP domain from the user’s Active Directory attributes.

3.    Outlook will then use the user’s SMTP domain to construct DNS queries for the following URLs:

·       https://<smtpdomain>/autodiscover/autodiscover.xml

·       https://autodiscover.<smtpdomain>/autodiscover/autodiscover.xml

·       Autodiscover SRV record

 

External Network

1.    Outlook will query for the Service Connection Point object, which is defined on each Client Access Server in AD DS.

2.    If for some reason the SCP object cannot be retrieved, or if the SCP is unavailable, Outlook will extract the SMTP domain from the user’s Active Directory attributes.

3.    Outlook will then use the user’s SMTP domain to construct DNS queries for the following URLs:

·       https://<smtpdomain>/autodiscover/autodiscover.xml

·       https://autodiscover.<smtpdomain>/autodiscover/autodiscover.xml

·       Autodiscover SRV record

 

Thank you.