How does Lync 2010 use Exchange calendar information?

I’ve had a few questions come up lately around when Lync 2010 polls Exchange for free/busy information and how/when presence state is updated based on your calendar. I did a bit of digging into it and think I’ve worked a few things out that make the whole situation a bit clearer.

There are two things to consider here. We need to look at how often Lync polls Exchange for the free/busy information, and then how often your calendar state is published to your Lync presence i.e. you change from Available to In a Meeting based on the free/busy data that was retrieved from Exchange.

How is it controlled?

Everything we need to look at here is defined in a Lync Client Policy and there are two parameters that you need to specify interval durations for – either WebServicePollInterval (if you’re using Exchange Server 2007/2010) or MAPIPollInterval (if you’re using Exchange Server 2003) and CalendarStatePublicationInterval. I’ll go into more detail on each of these below.

Lync determines when to change your presence from for example, Available to In a Meeting with this data. This means that if you create an appointment in Outlook in-between when Lync polls Exchange and when Lync applies your calendar state to presence, this won’t be reflected in Lync until the polling interval lapses and Lync retrieve the Free/Busy info from Exchange again.

Retrieving Calendar Data from Exchange

So firstly, we need to look at how calendar data (free/busy information) is retrieved from Exchange Server by Lync.

Exchange Server 2003

If you’re (still) using Exchange Server 2003, Lync will poll the server via a MAPI RPC call for free/busy information. This is controlled in the Lync Client Policy using the parameter MAPIPollInterval.

The default is 30 minutes but this can be changed to anything from 5 minutes to 480 minutes (5 hours). So to set it to 5 minutes, the cmdlet would be Set-CsClientPolicy -MAPIPollInterval 00:05:00.

Exchange Server 2007/2010

Update 28th Jan 2013: Amended to explain that Lync connects to the Exchange Autodiscover service first before being directed to the EWS URL, thanks Marcin Swiatelski. 🙂

For those using Exchange Server 2007 or 2010, Lync will be connecting to your Exchange Autodiscover Service URL and then onto your Web Services URL for free/busy information rather than the local MAPI profile in Outlook.

It builds this Autodiscover URL based on your SIP address, and not by anything you configure in Exchange or from the AD Service Connection Point. So if my SIP address is, the two URLs Lync will attempt to connect on will either be: or

For Lync to connect to the Exchange Autodiscover service, you need one of these URLs to be accessible.

Typically the option is the most commonly deployed, as this compliments what is already usually deployed for Outlook 2010 to work.

Once Lync has connected to the Exchange Autodiscover service, it will receive EWS URLs to connect to e.g. or

The interval in which Lync connects to EWS to poll for free/busy information is controlled in the Client Policy using the parameter WebServicePollInterval. The default is 30 minutes but this can be changed to anything from 5 minutes to 480 minutes (5 hours). So to set it to 5 minutes, the cmdlet would be Set-CsClientPolicy -WebServicePollInterval 00:05:00.

Publishing Calendar Data to Presence

So now once we’ve retrieved that calendar data from Exchange, Lync needs to actually apply it to your presence, and how often this occurs is controlled by the CalendarStatePublicationInterval parameter in the Lync Client Policy.

Unlike the MAPIPollInterval and WebServicePollInterval parameters, the CalendarStatePublicationInterval parameter must be set in number of seconds.
So to set it to 5 minutes, the cmdlet would be Set-CsClientPolicy -CalendarStatePublicationInterval 300. 

Polling and Publication

My understanding from perusing TechNet library articles is that there is a difference between Polling and Publication of calendar information in the Lync client.

I could have interpreted this incorrectly, but I’m pretty sure this is the way calendar information is handled by Lync. If anyone can shed additional light, please let me know in the comments.

TechNet Library References:


Migrating User Settings to Lync Server 2010

14 thoughts on “How does Lync 2010 use Exchange calendar information?

  1. Pingback: How does Lync 2010 use Exchange calendar information? | Justin Morris on UC « JC’s Blog-O-Gibberish

  2. Pingback: How does Lync 2010 use Exchange calendar information? | Justin Morris on UC « JC’s Blog-O-Gibberish

  3. Marcin Swiatelski

    Hi Justin,
    This is a great article and it encouraged me to spend some time on Lync/EWS configuration. I found that Lync 2010 client actually uses Exchange autodiscover service. You are right that Lync does not use SCP record to find autodiscover but it creates autodiscover URL based on SIP domain name. I think that your article is not entirely correct as you wrote that Lync creates EWS URL based on SIP domain. Lync creates autodiscover URL (e.g. then connects to the autodiscover service and obtains EWS and other URLs (e.g ECP URL for voicemail).
    Kind regards,

    1. Justin Morris

      Hi Marcin,

      Thanks for the correction. You’re right, Lync does connect to the Autodiscover service first before being directed to the EWS URL. I’ve updated my post to reflect that.

  4. Steve Moore

    Hi Justin,

    nice article.

    I have been looking at autodiscover at the moment and noticed that when a user’s SIP address and Primary SMTP address do not match, that the Lync client learns the Primary SMTP address for the user when signing in and so then connects to Exchange’s autodiscover based upon the email domain of the user’s email address. I am assuming we learn the email domain from the WindowsEmailAddress attribute (Get-CSUser | ft WindowsEmailAddress). In your article I believe you say that autodiscover URLs are built based upon your SIP domain, my experience today with the 2010 client is that the autodiscover URL has been built based upon the user’s Primary SMTP address. So if sip domain was and email address I see connections to and not to



  5. Mehmet Kocak

    Hi Justin,

    nice article

    I have also been looking into the EWS discovery for Lync Clients.
    If the very same Lync Enabled AD Account is also Mailbox Enabled, then as above the AD attribute is populated with the users Primary SMTP Address..
    The users Lync Pool will construct the Presence.xml and return to the client, this will contain the users Primary SMTP Address (amongst other stuff), Run Snooper at the time of Login and examine the in band provisioning process.
    Also in a Lab/Test environment, change the Primary SMTP Domain Address for the Lync AD Account that is also Mailbox enabled.
    Run Wire shark and filter on UDP 53
    Then sign in to Lync with the disjoint SIP/SMTP Address account.
    You will see the Lync client performs the Autodiscover Lookups to ONLY the DNS Name space of the users Primary SMTP Address not the SIP address Name Space.

    Lync will NEVER perform SCP lookups internally Like Outlook Clients do, Lync all ways using Autodiscover DNS A and SRV records

    Thanks Guys


  6. Debra McKibben

    If a user sets up Out-of-Office rule in Outlook and shuts off computer before information is synced in Lync, will it sync even if computer is turned off? We ran this scenario and it seems not. So, when OOO rule is enabled in Outlook, user must wait for info to be synced with Lync before shutting down computer or messages will not be the same. Could you please advise if this is your understanding. Many thanks!


Leave a Reply to Steve Moore Cancel reply

Your email address will not be published. Required fields are marked *