Microsoft Lync Server 2010
Understanding and Troubleshooting Microsoft Exchange Server Integration
Published: May 2011
Dave Howe, MCSE
Senior Support Escalation Engineer
Microsoft Corporation - Charlotte NC, USA
This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.
Copyright © 2011 Microsoft Corporation. All rights reserved.
Table of Contents
Purpose
Features Overview
Voice Mail
Contact Search
Unified Contact Store
Free/Busy
Microsoft Exchange Delegates
Working Hours
OOF Message
Conversation Environment
Types of Conversations
Conversation Categories
User Interface
Conversation History
Exchange Connectivity
Autodiscover Service
Outlook Client
UC Clients and Devices
Processing the Autodiscover Response
Caching Exchange URLs in Registry
Retrieving Data from Microsoft Exchange Mailbox
Reverse Proxy Pre-Authentication
MAPI/EWS Error Handling
Feature Availability
UC Client Features (by Connection Type)
UC Device Features (by Connection Type)
Feature Impact
UC Client Features (Connectivity Failures)
UC Device Features (Connectivity Failures)
UC Device Features (Authentication Failures)
UC Device Authentication
Strong User Authentication (SUA)
Troubleshooting Exchange Integration
Lync Configuration Information
Outlook / Test E-mail AutoConfiguration
Checking the Registry for Cached EWS Data
How to Convert the AutoDiscovery TimeStamp
Exporting EWS Configuration Information
Get Autodiscover Service Connection Points (SCPs)
Get Exchange Web Services Configuration
Get Exchange Certificate (from each Client Access Server)
Using Microsoft Exchange Synthetic Transactions
How to Create a Client Access Server Test Account
How to Test EWS Connectivity
How to Test EWS Connectivity using Autodiscover
How to Test MAPI Connectivity
How to Test Outlook Connectivity to EWS
Analyzing the UC Device CELog File
How to Collect and Analyze CELog Data
Collecting Microsoft Exchange Traces
How to Collect EWS Tracing
Scenario: Integration Errors in Lync and on UC Phone (DNS)
Scenario: Integration Error on UC Phone (Certificates)
Scenario: Integration Error on UC Phone (Permissions)
Scenario: Integration Errors in Lync and on UC Phone (Corruption)
Appendix A: Lync / MAPI Error Strings
Appendix B: Lync / EWS Error Strings
Microsoft Lync Server 2010: Understanding and Troubleshooting Microsoft Exchange Server Integration
Purpose
The purpose of this document is to introduce the reader to some of the new client features that are available whenever Microsoft® Lync™ Server 2010 communications software is integrated with Microsoft® Exchange Server 2010. Successfully integrating these two enterprise communications solutions can be challenging, especially considering that there are subtle differences in the way that services from each product are leveraged by Lync Server 2010 clients.
I decided to write this document after troubleshooting several Exchange Server 2010 integration issues reported by Technology Adoption Program (TAP) customers during the Microsoft Lync Server 2010 Beta program. The information contained in this document is not intended to be authoritative with regard to this topic. Rather, this document can simply be described as a collection of information that I’ve read from various product specifications as well as some general troubleshooting information. That’s all – nothing more.
Please note that this document does not cover Microsoft® Lync™ 2010 instant messaging (IM) and Microsoft Exchange Outlook Web Access (OWA) integration. For details, see the following:
- “Enable Exchange 2010 SP1 Outlook Web App and IM Integration” in the Microsoft TechNet Library at
- “Configuring Lync RC and Exchange 2010 SP1 to Enable OWA as a Lync Endpoint” on Ilse Van Criekinge’s Weblog at
- “Exchange 2010 RTM/SP1 OWA IM Integration with Microsoft Lync Server 2010” on Jens Trier Rasmussen’s blog at
I hope that you find the information provided in this document to be helpful.
Thanks!
Dave Howe
Features Overview
Lync 2010, as well as other unified communications (UC) clients and devices, interact with Microsoft Exchange and Microsoft®Outlook to provide Microsoft Exchange-integrated features to the end user, including:
- Contact Information
- Calendar Information
- Conversation History
- Missed Conversations
- Missed Calls
- Voice Mail Playback
The following table shows a list of features by UC client:
Feature / Lync 2010 / Office Communications 2007 R2 / Desktop phoneVoice Mail / Yes / No / Yes
Conversation History / Yes / No / Yes (Call Logs)
Missed Conversations / Yes / No / Yes
Contacts / Yes / Yes / Yes
Free/Busy Info / Yes / Yes / Yes
Working Hours / Yes / No / No
OOF Messages / Yes / Yes / Yes
Two methods of connectivity with Microsoft Exchange are used to provide this array of integrated features to the user, Exchange Web Services (EWS) and Messaging Application Programming Interface (MAPI). MAPI has been the primary method used by clients to connect to Microsoft Exchange.
To provide client-independent connectivity to Microsoft Exchange, EWS was introduced in Microsoft Exchange Server 2007 SP1. This method of Microsoft Exchange connectivity can be used by any client that supports XML/SOAP using a web interface. The cross-platform flexibility of EWS is an ideal solution for providing Microsoft Exchange integration for desktop clients as well as mobile desktop phones.
The following sections provide additional detail about each of these features and their interactions with various versions of Microsoft Exchange.
Voice Mail
New in Lync 2010, this feature supports fetching and playback of voicemail messages from Microsoft Exchange through the phone environment. Voicemail retrieval is supported throughEWS through a periodic poll (every three minutes, configurable through in-band provisioning). However, configurations without EWS cannot pull these items because MAPI does not support item retrieval. In these configurations, Lync retrieves the new voicemail count by using MAPI calls over a persistent connection.
Contact Search
Lync 2010 accesses the user’s contacts from Microsoft Exchange and merges this information with the Lync Contacts list in order to include Outlook and other contacts in the Lync client search results. All configurations of Lync and Microsoft Exchange support this feature, but the particular interface used depends on the specific configuration.
For Exchange Server 2003, Exchange Server 2007, or Exchange Server 2010 without SP1, the contact feature proceeds through MAPI if it is accessible (changes are pushed instantly over a persistent connection) and through EWS if MAPI is not accessible (through a 15-minute poll for changes). For Exchange Server 2010 SP1, contacts proceed through EWS, where they are pushed over a persistent connection.
Unified Contact Store
With the Lync2010 release, the Lync clienthas implemented a unified contact store, which unifies the Lync Contacts list with Outlook, and other contacts, by storing the shared list on Microsoft Exchange. This enables the Lync Contacts list information to be present across all of the user’s endpoints.Unified contact storeisonly available for Lync 2010 and Exchange Server 2010 SP1, throughEWS. Unified Contacts are synchronized continuously througha persistent connection. In all other configurations, this feature is disabled.
Free/Busy
Microsoft Exchange serves as the centralized calendar information store for Microsoft Office products, and as a result, Lync pulls free/busy information for contacts from Microsoft Exchange. This data is sent through EWS if it is available and through MAPI if EWS is not available. Regardless of the interface, free/busy information is synchronized every 30 minutes by polling the server running Microsoft Exchange.
Microsoft Exchange Delegates
Delegate information is synchronized once each time a user signs into Lync. This feature proceeds through MAPI only; if MAPI is not available, it is disabled.
Working Hours
New in Lync 2010, working hours information is similarly drawn by Lync from Microsoft Exchange. This data is sent through EWS if it is available; there is no fallback to MAPI if EWS is unavailable. Free/busy information is synchronized every 30 minutes through a poll.
OOF Message
Out of Office (OOF) messages and information are pulled from Microsoft Exchange. This data is sent through EWS if it is available and through MAPI if EWS is not available. Regardless of the interface, OOF information is synchronized every 30 minutes through a poll.
Conversation Environment
One of the most important features offered through Microsoft Exchange integration is the conversation environment. The conversation environmentprovides an easy way for users to initiate a follow-up conversation with people based on missed and past conversations.The conversation environment is displayed as its own tab in the Lync user interface, and it should display nearly all forms of UC conversations.
All past conversations are stored in the Microsoft Exchange mailbox of the Lync user (history and retention time is defined by managed Microsoft Exchange policies). This collection of past conversations is referred to as Conversation History.
Types of Conversations
The types of conversations that will be displayed in the conversation environment include:
- Peer-to-peer instant messaging (IM)conversations
- Peer-to-peer calls
- Peer-to-peer video calls
- IM conference (multi-party IM)
- Conference call (multi-party audio/video conversations)
- Adhoc collaboration session (including file and screen sharing)
- Scheduled (and attended) collaboration session
Conversation Categories
There are two different categories of conversations that are displayed in the conversation environment:
Active Voice Conversations
Displays active conversations with a voice component. Conversations are considered active voice conversations if they are voice-involved conversations that the user is a current participant of (for instance, if the conversation window is open and a voice-involved conversation is ongoing). These conversations are sorted by most recent start time (most recent at the top).
Other Conversations
Displays all other conversations, sorted chronologically. For voice conversations, the timestamp is the start time of the conversation; for non-voice conversations, the timestamp is the time of the most recent communication. These conversations can fall into one of the following groups, but the groups are not separated or delineated in any way.
- Active non-voice conversations
These are conversations that are currently active, but do not involve voice.
- Missed conversations
These are conversations that were missed while the user was away from the desk, were ignored, or weren’t responded to in time. Conversations are represented as missed conversations only after they are written in the Conversation History folder stored in the Microsoft Exchange mailbox of the Lync user. All missed IM and conference calls are written in the Conversation History folder by a Lync active end point, while the missed call logs are written by the Front EndServer. Missed conversations roam, and they are displayed on all Lync end points.
As with voicemail, item retrieval is supported through EWS through a periodic poll (every 15 minutes). However, configurations without EWS cannot pull these items since MAPI does not support item retrieval. In these configurations, Lync retrieves the unseen missed count via MAPI. These MAPI notifications are instantly pushed through to Lync over a persistent connection.
While there may be future support that will allow Lync to read missed conversation items through MAPI, for now only EWS provides retrieval of missed conversations from a given mailbox.
- Recent Conversations
These are conversations from the user’s recent past in which the user participated (that is, not missed conversations). This is not a complete list of all past conversations but rather a preview of conversations that have happened in recent past. To avoid performance issues, Microsoft Lync 2010 Phone Edition will retrieve only 100 of the most recently archived conversation items. Recent conversations include both incoming and outgoing conversations. Although both EWS and MAPI can be used to write conversation items into a Microsoft Exchange mailbox, items can only be retrieved by using EWS.
User Interface
The icon for the conversation environment can be found in the Launcher menu bar located near the top of the Lync window. As new conversations are received, the indicator for the number of conversations waiting acknowledgement is incremented by +1 in the UI.
The conversation environment window displays both Active and Past conversations. Additionally, a Pivot menu can be used to display either all items, only missed conversations, or only phone calls. Active items will be grouped at the top of the list, followed by Past items. Items will be sorted chronologically by time of most-recent activity, with voice and video conversations at the top.
In Outlook 2010, a user has the option of grouping email messages as well as Lync conversations by threads. Lyncuses the conversation ID value to group conversation entries into threads. Only the most recent event in a given conversation thread will be displayed in the conversation environment window.
Conversation History
Past conversations are archived and stored in the Conversation History folder in the Microsoft Exchange mailbox of the Lync user. Conversation History items appear similar to that of standard mail items, and as such, can be replied to by using Outlook. Likewise, each Conversation History item will have a Mode (IM, Call, or both), which will be displayed using a custom icon in the message header.
Conversation History Observer
The Conversation History Observer is responsible for monitoring all of the various ongoing conversations in which the user is a participant, collecting all of the relevant information about each conversation. When archiving is needed, the Conversation HistoryObserver creates a MailItem object containing the conversation data, and then it leverages a spooler component to write this information into the user’s mailbox.
Archiving Logic
There are generally three rules which govern the behavior of the Conversation History Observer for conversations involving the local user:
- A conversation starts when the first conversation mode gets connected. Whenever a conversation starts, it initializes monitoring of the conversation as it progresses, collecting data for a future archiving event.
- A conversation ends when the last Mode is disconnected from the conversation. When the conversation ends, the observer performs an incremental archive of all data collected during the conversation.
- A conversation is missed when an unsuccessful, outgoing conversation attempt is made. A missed/unsuccessful conversation archive is made in response to such events.
Message Classes
The following message classes are used by the Conversation History Observer when archiving a conversation or missed conversation to a Microsoft Exchange mailbox:
IPM.Note.Microsoft.Conversation (IM, IM conferences)
IPM.Note.Microsoft.Missed (Missed IM, Missed IM conferences)
IPM.Note.Microsoft.Conversation.Voice (A/V calls, A/V conferences)
IPM.Note.Microsoft.Missed.Voice (Missed A/V calls, Missed A/V conferences)
Error/Failure Notifications
Leveraging a background thread, archived conversations are serialized to disk by the Conversation History Observer as MailItem objects. The serialized MailItem objects are picked up by the History Spooler and are then written to the Conversation History folder in the user’s Microsoft Exchange mailbox.
In the event of an error condition, the user will be alerted using the following logic:
1.If the serialization of archived conversations fails, for example due to disk full condition, the user is informed; if this happens when the user is closing the conversation window, then the closing of the conversation window is blocked and user confirmation is requested.
2.If the History Spooler is unable to commit archived conversations to a user’s mailbox for 30 days, for example due to an offline server running Microsoft Exchange, the failure is reflected in the notification area of the Launcher menu bar.
Exchange Connectivity
Many of the features offered within Lync2010 have dependencies on connectivity to a Microsoft Exchange mailbox. For example, the conversation environment feature leverages both Exchange Web Services (EWS) and MAPI to manage Conversation History items. Unlike previous versions of Lync, EWS is now the primary method used to provide Microsoft Exchange integration features for the Lync client. MAPI will be used if EWS is unavailable, but only in a limited capacity.
The impact of this design can be significant for a given user, depending on the location of their mailbox. If the user has an Exchange Server 2003 mailbox, the Lync client will not be able to use EWS to interact with Microsoft Exchange. Rather, MAPI will be used in a fallback capacity to access the Microsoft Exchange mailbox. While the Lync client will be able to write new archived Conversation History items into the user’s mailbox, it will fail to retrieve any existing Conversation History items from the user’s mailbox.
However, for a user whose mailbox resides on a server running Exchange Server 2007 SP1 or Exchange Server 2010, the Lync client will leverage EWS to provide the user with a complete experience for the conversation environment. Not only will EWS be used to write new archived Conversation History items into the user’s mailbox, but EWS will also be used to retrieve and display past Conversation History items to the user in the Lync client.
Autodiscover Service
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).