Archiving Options in Lync Server 2013

Update 7/11/13 - Added "How Do I View Archived Content?" section

Lync Server 2013 has made a couple of changes to what can be archived and where that archived data can be stored.


What's New?

  • Collocation of Archiving on Front End Servers
  • Exchange Server 2013 Integration
  • SQL Store Mirroring
  • Archiving of Whiteboard and Polls

With the collocation of the Archiving Server role onto the Front End Servers, we've eliminated the need for a separate Archiving Server in Lync Server 2013.  This will help to reduce the server footprint required.  The Archiving service uses Unified Data Collection Agents that are responsible for capturing data and are located on all Front End Servers and Standard Edition Servers.  This also means that MSMQ is no longer needed!  It has been replaces by LySS (Lync Storage Service).  Also, you now have the choice to use Lync for the archiving store or Exchange Server 2013.  However, you can't archive to both locations at the same time.  Archiving to Lync is similar to previous versions.  The archived information is stored in the LcsLog database in SQL.  If you decide to use Exchange Server 2013 are the archiving store, you will be using OAuth and EWS to deliver the archived data to Exchange Server 2013.  Archiving also supports SQL mirroring for high availability and the database can be collocated in the same instance as the Front End Server databases, or it can be in a separate instance.


What Information Can Be Archived?

The following types of content can be archived:

  • Peer-to-peer instant messages
  • Conferences (meetings), which are multiparty instant messages
  • Conference content, including uploaded content (for example, handouts) and event-related content (for example, joining, leaving, uploading sharing, and changes in visibility)
  • Whiteboards and polls shared during a conference

The following types of content are not archived:

  • Peer-to-peer file transfers
  • Audio/video for peer-to-peer instant messages and conferences
  • Desktop and application sharing for peer-to-peer instant messages and conferences

The Lync Server 2013 Archiving service does not archive Persistent Chat conversations. To archive Persistent Chat conversations, you must enable and configure the compliance service, which is a component that can be deployed with the Lync Server 2013 Persistent Chat Server.


How Archiving to Lync Works

The first thing is to enable archiving.  You can do that in the Lync Server 2013 Control Panel or via the Lync Server Management Console:

Indicates which items (if any) are saved to the archiving database. Valid values are:

  • None. Archiving is disabled. This is the default value. If EnableArchiving is set to None then nothing will be archived in either your Lync Server archiving database or in Exchange 2013.
  • ImOnly. Only instant message transcripts are archived. If Exchange archiving is enabled these transcripts will be archived in Exchange 2013. If Exchange archiving is disabled then these transcripts will be archived to Lync Server.
  • ImAndWebConf. Both instant message transcripts and Web conferencing transcripts are archived. If Exchange archiving is enabled these transcripts will be archived in Exchange 2013. If Exchange archiving is disabled then these transcripts will be archived to Lync Server.


Once archiving is enabled and an Archiving Policy is applied to your users, the Archiving Data Collection Agent on each of the Front End Servers in the pool will monitor for IMs and/or Web Conferences that need to be archived.  It will send those to be archived communications to the LySS.  The LySS will then write it to the appropriate repository, either SQL or Exchange Server 2013.


How Archiving to Exchange Server 2013 Works

The process for archiving to Exchange Server 2013 works similarly to archiving to SQL.  When configuring the archiving settings for Exchange Server 2013, remember to check the box for Exchange Server integration.

When set to True, Lync Server 2013 instant message and conferencing transcripts are stored in Microsoft Exchange Server 2013 rather than a separate SQL Server database.  Note that if you enable Exchange archiving then users will be managed by the Exchange archiving policies instead of Lync Server 2013 archiving policies.  The default value is False.

Lync Server 2013 will use OAuth to connect to the user's mailbox in Exchange Server 2013.  You will need to configure both Lync Server 2013 and Exchange Server 2013 for Oauth.  You can refer to the Configure OAuth Authentication TechNet article for Exchange Server 2013 and the Managing Server-to-Server Authentication (Oauth) and Partner Applications TechNet article for Lync Server 2013.  For users with a mailbox on Exchange Server 2013 and on In-Place hold the Exchange Archiving Policies override Lync Server archiving policies.  You can also set the archiving policy manually for individual users using the Set-CsUser to select the archiving policy:

Indicates where the user's instant messaging sessions are archived. Allowed values are:

  • Uninitialized - Indicates that archiving will be based on the In-Place Hold settings configured for the user's Exchange mailbox; if In-Place Hold has not been enabled on the user's mailbox then the user will have his or her messaging and Web Conferencing transcripts archived in Lync Server.
  • UseLyncArchivingPolicy - Indicates that the user's instant messaging and Web conferencing transcripts should be archived in Lync Server rather than in Exchange.
  • NoArchiving - Indicates that the user's instant messaging and Web conferencing transcripts should not be archived at all. Note that this setting overrides any Lync Server archiving policies assigned to the user.
  • ArchivingToExchange - Indicates that the user's instant messaging and Web conferencing transcripts should be archived to Exchange regardless of the In-Place Hold settings that have (or have not) been assigned to the user's mailbox. 


Where in Exchange Server 2013 are Archived Lync Messages Stored?

When the user is set to archive into Exchange Server 2013, the messages are stored in a hidden folder (Recoverable Items > Purges) in their mailbox.  One way to verify this is to use EWSEditor:

Opening up the Purges folder will show you all the conversations that have been archived for that user.


Best Practices

One thing to check when setting up archiving to either SQL or Exchange Server 2013 is to run the Get-CsArchivingConfiguration cmdlet make sure that ArchiveDuplicateMessages is set to True:

From the Set-CsArchivingConfiguration TechNet article:

The ArchiveDuplicateMessages parameter specifies how "cross-pool" instant messages should be archived. Consider a simple example: Ken Myer (with an account in Pool 1) sends an instant message to Pilar Ackerman, who has an account in Pool 2. Pilar, in turn, sends a reply to Ken’s instant message. If ArchiveDuplicateMessages is set to False, then (based on a built-in algorithm) the session transcript will be logged in either Pool 1 or Pool 2, but not both. If ArchiveDuplicateMessages is set to True (the default value), the transcript will be logged in both pools.

Another parameter to look at and possibly adjust depending on your company policies is CachePurgingInterval.  From the Set-CsArchivingConfiguration TechNet article:

This parameter indicates how often (in hours) the system is purged of transcripts where none of the participants have been enabled for archiving. By design, all group IM sessions and conferencing sessions are recorded when they take place. At the specified interval, the system determines whether any of the participants in these sessions have been enabled for archiving. If the system finds a session where none of the participants have been enabled for archiving, then that transcript will be deleted from the database. The CachePurgingInterval property can be set to any integer value between 4 and 168, inclusive. The default value is 24.


How Do I View Archived Content?

One way to view archived data in SQL you can use the Export-CsArchivingData cmdlet.  This will export P2P and conference data to .eml messages.

This will export the conversations to the output folder and create folders for each date that a matching conversation was found:

If you open one of the folders you will see all of the conversations listed.  The file names have conf or p2p at the end so that you can quickly tell conferences apart from 1:1 conversations.  The conversations are stored as .eml files.  This means that you can open them using Outlook.

Opening one of the messages using Outlook will show you the transcript of that conversation:


Another way is to use a third party tool or report to pull information out of the archiving database.  I have created a Sample Lync Server Archiving Report that you can use:

You can find more information on the report, including the download link, here.

Comments (17)

  1. NeighborGeek says:

    So if lync is configured to archive to exchange, are IM’s only archived for users who have their mailboxes on an in-place hold?

    If so, then the exchange integration for archiving doesn’t seem like a good fit for organizations that want all IM content archived. Is that correct?

  2. dodeitte says:


    There are two options when it comes to archiving to Exchange. When the ExchangeArchivingPolicy parameter for the user is set to Uninitialized then whether or not the user is set for in-place hold will determine where the Lync content is archived. If the ExchangeArchivingPolicy parameter is set to ArchivingToExchange then regardless of the in-place hold settings, Lync content will be archived to Exchange.

  3. C8 says:

    Good read – thank you. I have a question regarding the normal Exchange process of clearing out deleted/recoverable items though. If the (default) mailbox retention period is 14 days for deleted items, what would happen to archived Lync content older than
    14 days if no legal hold is also in-place?

  4. Priit says:

    Would be awesome if you could add the same information about using SQL database for the archive. Other than that looks helpful blog article.

  5. CM4 says:

    Thank you for this, can you confirm that you would need a lync specific SSRS deployment with the monitoring roles deployed to the FE pool to use your custom archiving viewer report?


  6. dodeitte says:


    You don’t need a Lync specific instance of SSRS. You can deploy the Archiving Reports into any existing SSRS 2012 deployment that you have.

  7. Dino Caputo says:

    Doug – have you tested this with Exchange Online? Users are showing "ExchangeArchivingPolicy : ArchivingToExchange" however we never see messages in the Purges folder in Exchange Online using EWSEditor.

  8. alex says:

    what about exchange online. can we turn archiving to exchange online?

  9. dodeitte says:

    @Dino Caputo and @Alex

    I haven’t tested it, but have you made sure that you’ve setup Lync Server 2013 to trust the Office 365 Authorization server? If not, you can follow the instructions here:

  10. Shilin says:

    If archiving on the mailbox is enable. where the user will find the archiving messages in Outlook

  11. dodeitte says:


    Please see the section "Where in Exchange Server 2013 are Archived Lync Messages Stored?" above. When archiving is enabled, the archived messages aren’t visible to the user.

  12. jalaed says:

    Question: Is there a way to extract all the archiving messages of all users when using Exchange 2013 integration? MS is touting that this method is searchable, but what happens if we need all the dump of the archiving messages from the exchange mailboxes?
    Will this be a slow process since I need to grab the data from all exchange databases correct?

  13. dodeitte says:


    You will need to use Exchange’s tools for extracting archived data. Speed is dependent of the number of users and the amount of data that needs to be returned.

  14. Skype4B-Guy says:

    Is there any details for the scenario of Lync/Skype4B on-prem and archiving to Exchange Online?
    There is not much out there in terms of the experience or even the setup configuration.

  15. Gareth says:

    Hi, do you know when should actually be purged if “enable purging of archiving data” and “purge exported archiving data only are ticked? I used the Export-CsArchivingData cmdlet yesterday to export all archiving data for a test user for 2016, today I ran the same command again and was expecting it to return no archiving data because it would be purged. Most of the data has been there for well over 14 days, so shouldn’t it have been purged?
    This is the result for “Get-CsArchivingConfiguration”
    Identity : Global
    EnableArchiving : ImAndWebConf
    EnablePurging : True
    PurgeExportedArchivesOnly : True
    BlockOnArchiveFailure : False
    KeepArchivingDataForDays : 14
    PurgeHourOfDay : 2
    ArchiveDuplicateMessages : True
    CachePurgingInterval : 24
    EnableExchangeArchiving : False

  16. Harsha says:


    How exactly the a file transferred between Peer-to-Peer ? Will there be any involvement of Lync Server in between the Peer-to-peer file transfers?

    If there is no involvement of Lync Server, is there a way to archive(or extract) the files(or documents) transferred between peer-to-peer (not from conferences), onto Lync Server or Exchange Server for audit or search purposes. Please let me know even if it is by using SDK or by registering SIP receivers or some other tweak in the file transfer process.


    1. dodeitte says:

      File transfer is between the clients. The only involvement of the Front End Server(s) is the SIP signaling. There is no built in way to capture the file for archiving purposes. In the past, some third party solutions used MSPL to change the behavior of the file transfer process in order to capture the file.

Skip to main content