Using SharePoint Server 2013 Discovery Center to find Lync archived content

In this post I described how Lync 2013 Preview could archive content in Exchange 2013 Preview mailboxes. SharePoint Server 2013 is able to search in such archives using the SharePoint Server 2013 eDiscovery site collection.

SharePoint Server 2013 is using the Exchange Web Services Managed API V2.0 and Server to Server authentication (S2SOAuth) to be able to read data from Exchange 2013.

I will now describe how to configure SharePoint Server 2013 to allow a user to discover Lync archived data. The goal of the configuration below is to allow the user test2 to search Lync archived data in Exchange for the user test1.


Let me show how to configure the integration. I will use the following sample environment to illustrate the configuration:

  • One Lync Server 2013 Enterprise Edition pool with two Lync Server 2013 Front End Servers and
  • Pool FQDN is
  • Two test users are enabled with SIP URI and
  • One Exchange 2013 Client Access server with FQDN
  • One Exchange 2013 Prevew Mailbox server with FQDN
  • The test users have Exchange 2013 mailbox with the primary SMTP address and
  • One SharePoint Server 2013 server with FQDN
  • A Web Application available at https://sps15 and http://sps15. Alternate access mapping set for
  • Appropriate SSL certificate set on the web site in IIS 
  • A DNS record for points to

In the sample environment, the programs have been installed on the C: drive.

Step 1: Exchange 2013 Autodiscover Service

Configure the Exchange 2013 Autodiscover service to be available on the FQDN Use the following Exchange Management Shell command on

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri

Step 2: Exchange Web Services Managed API V2.0

Install the EWS Managed API from the link above on Make sure that the Microsoft.Exchange.WebServices.dll is loaded into the GAC by using GacUtil. Make sure to use the .NET 4 version of GacUtil (C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools after you have installed .NET 4.0 SDK)

GacUtil /i C:\Program Files\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll

Step 3 SharePoint S2SOAuth configuration with Exchange

Now it is time to configure SharePoint to do S2SOAuth with Exchange.  Use the following SharePoint 2013 Management Shell commands:

  • New-SPTrustedSecurityTokenIssuer -name "Exchange" -MetadataEndPoint ""
  • $sts=Get-SPSecurityTokenServiceConfig
  • $sts.HybridStsSelectionEnabled = $true
  • $sts.AllowMetadataOverHttp = $false
  • $sts.AllowOAuthOverHttp = $false
  • $sts.Update()
  • $exchange=Get-SPTrustedSecurityTokenIssuer "Exchange"
  • $app=Get-SPAppPrincipal -Site http://sps15 -NameIdentifier $exchange.NameId
  • $site=Get-SPSite http://sps15
  • Set-SPAppPrincipalPermission -AppPrincipal $app -Site $site.RootWeb -Scope sitesubscription -Right fullcontrol -EnableAppOnlyPolicy

 Step 4 Exchange S2SOAuth configuration with SharePoint

We now need to configure the Exchange 2013 side of things. Use the following Exchange Management Shell commands:

Make sure to restart IIS on both front-end and back-end by issuing the following commands in a command window:

  • iisreset e15fe
  • iisreset e15be

 Step 5 Give discovery user appropriate permissions

We need to add the user test2 to "Discovery Management" role group to allow test2 to do the discovery. Use the following Exchange Management Shell commands:

  • Add-RoleGroupMember "Discovery Management" -member test2

 Step 6 Create a eDiscovery site

Use the following SharePoint 2013 Management Shell commands:

  • $template=Get-SPWebTemplate | where-object {$_.title -eq "eDiscovery Center"}
  • New-SPSite -Url https://sps15/sites/Discovery -OwnerAlias test2 -Template $template -name "Discovery Center" 

By adding test2 as owner I make sure that the user has the necessary permissions on the site.

Step 7 Set Lync Archiving Policy for test1

Use the following Lync Management Shell commands on to enable archiving to Exchange for test1.

  • Set-CsUser test1 –ExchangeArchivingPolicy ArchivingToExchange

Step 8 Generated test data

For both test users sign in to Lync 2013. From test1 send an IM to test2 with the text "eDiscovery Lync Archived test data". Close the conversation windows.

Step 9 Create Exchange content source

We need to add Exchange 2013 as a content source in SharePoint. Use the SharePoint 2013 Central Administration website as follows:

  • Central Administration –> Manage Service Applications –> Select the Search Service Application
  • Search Administration –> Result Sources –> New Result Source
  • Name the Result Source "Exchange"
  • Select Protocol to be Exchange
  • In the Exchange Source Url enter and do not select Use AutoDiscover
  • Click OK

 Step 10 Create eDiscovery case

Now we need to create an eDiscovery case using the Discovery web site created in step 6. As test2 sign into Windows and use IE to access the web site https://sps15/sites/discovery.

  • Click Create new case
  • Give the case the title test1 and add test1 as the end of the URL name
  • Click Create

 Step 11 Create eDiscovery set

Now we need to create an eDiscovery set using the eDiscovery case created in step 10.

  • Under eDiscovery Sets click new item
  • Give the eDiscovery set the name test1
  • In the Filter box write "eDiscovery Lync*"
  • Click Add & Manage Sources
  • Specify test1 in the mailbox field, click the Check Mailbox icon and Click OK

SharePoint will now start a search against the test1 mailbox and should show that it has found 2 Items: 1 item from the Conversation History folder and 1 item from the archived data in the Purges folder.

You can now Save the eDiscovery Set and enable In-Place Hold if needed.