Configuring Unified Contact Store (UCS) with Lync server 2013


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”Capture

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.Capture23

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.

Certificate requirement

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

and note down the URLCapture13

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” Capture16

Once done, restart the IIS services on the CAS server and we are done with Exchange.Capture17

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;Capture15

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;

https://autodiscover.domain.com/autodiscover/metadata/json/1

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&#8221; Capture18

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.

To configure a custom UserServicePolicy, run the command New-CsUserServicePolicy as mentioned below;Capture21

Now go ahead and enable the the pilot users for above configured user policy by running the command Grant-CsUserServicePolicy as mentioned below;Capture22

To test the exchange connectivity, run the command Test-CsExStorageConnectivity with the user SIP URI. It might take some time to get the changes to reflect to exchange.Capture19

And finally to test the UCS availability for the user account, run Test-CsUnifiedContactStore command as shown below;

Test-CsUnifiedContactStore -UserSipAddress testuser@domain.com -TargetFqdn lync.domain.com –UserCredential $credCapture

The result would be;Capture2

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”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s