One of the interesting features that supports when both the Lync server and Exchange server are on 2013 platform, is the Unified Contact Store. The purpose of the UCS is that to store a Lync enabled user’s contact in Exchange server instead of Lync server it self. One of the other benefit is that, to use Outlook to manage contacts instead of Lync 2013 client.
Usually the default contact list provider for Lync client is the Lync server. When you go in to the configuration information of the Lync client, you can see that Lync Server is right in front of the “Contact List Provider”
After configuring UCS and enabling UCS for a user account, the default contact list provider will change to UCS as shown below. From that point onwards, the contact list if uploaded to Exchange server and will be managed by Exchange.
Going in to the configuration, the first step would be to configure the server to server authentication (oAuth) between Exchange server and Lync server. It must require a certificate that issued by a trusted issuing provider and configuring each other as partner application.
I have covered the certificate configuration steps in a previous article that described configuring integration between OWA and Lync server 2013. If this integration is in place, likely possibility is that the certificate configuration is already done. Else, you need to make sure that the Lync servers and Exchangers servers are having certificate that must be issued by a trusted issuing authority or an internal root certificate authority. It will not going to work if the Exchange is on self signed certificate.
Partner application configuration in Exchange Server 2013
Before configuring the partner application within Lync server, It requires to know the exchange auto discover URL. To get the auto discover URL, run the command;
Get-ClientAccessServer | Select-Object Name, AutoDiscoverServiceInternalUri | Format-List
To configure the Lync server as a partner application for exchange, you need to run the below command in exchange management shell. Within EMS, navigate in to the “Scripts” folder and execute the EnterprisePartnerApplication.ps1 script with the switch -AuthMetaDataURL and -ApplicationType. So the complete command would looks like;
“C:\Program Files\Microsoft\Exchange Server\V15\Scripts\Configure-EnterprisePartnerApplication.ps1 -AuthMetaDataUrl ‘https://<Lync FE server\Pool FQDN>/metadata/json/1’ -ApplicationType Lync”
Partner application configuration in Lync Server 2013
Before going in to the partner application configuration, oAuth configuration need to be set with the exchange auto discover URL. The purpose of this is to get the Lync server to know where to find the auto discover URL. The command that need to be run on Lync management would be;
Now to move in to partner application configuration, within lync server, you need to configure the exchange server as a partner application. To do this, the command New-CsPartnerApplication including -MetaDataURL and -ApplicationTrustLevel. The MetaDataURL would be something like;
The full command that need to be run on Lync Server management shell would look like;
New-CsPartnerApplication -Identity Exchange -ApplicationTrustLevel Full -MetadataUrl “https://autodiscover.domain.com/autodiscover/metadata/json/1”
That’s all there is to do with the server side configuration. Now to enable UCS for clients and do some testing. UCS configuration is there inside the “UserServicePolicy”. Usually in a deployment there will be only “Default” user policy. It’s not recommended to go ahead and enable the UCS within the default policy. Best practice is to configure a custom policy and assign that to pilot users before rolling it up to production.
And finally to test the UCS availability for the user account, run Test-CsUnifiedContactStore command as shown below;
Test-CsUnifiedContactStore -UserSipAddress email@example.com -TargetFqdn lync.domain.com –UserCredential $cred
At this point, the test user is successfully enabled for UCS and in client configuration, it should change the “Contact List Provider” form “Lync Server” to “UCS”