Lync 2013 – Oauth On-Premises (Lync Server 2013 and Exchange 2013)

What is this?

Since Lync Server 2013, there is a new prerequisite on the Lync Servers for Exchange 2013 interconnection: This will allow you to use :

  • Unified Contact Store (UCS)
  • Exchange OWA IM and presence Integration

Windows Identity Foundation

  “It’s a new extension to the Microsoft .NET Framework that makes it easy for developers to enable advanced identity capabilities in the .NET Framework applications.” This feature has been created to support server to server authentication. It is used by and Windows Communication Foundation applications. (In our situation, by Lync server 2013 and Exchange Server 2013)   In order to configure Oauth, you must do two things:

  • Assign a certificate to Lync Server’s
  • Set Exchange as a partner application.

Please note : “It should also be pointed out that you do not need to use server-to-server authentication: server-to-server authentication is not required in order to deploy Lync Server 2013. If Lync Server 2013 does not need to communicate with other servers (such as Exchange 2013) then server-to-server authentication is not needed.” Source   Also note that “your Lync Server 2013 default certificate can also be used as the OAuthTokenIssuer certificate” Source


There is two ways to install the WIF : Windows Server 2008 R2    Install with the Windows Identity Foundation (KB974405) installer.   Windows Server 2012    Server Manager Go to Add Roles and Features Wizard, select Features. Select Windows Identity Foundation 3.5 from the list. Click Next, then click Install.   Powershell

Once WIF has been installed you can run Deployment Wizard and Assign the Lync default certificate to Oauth certificate.


Description of Windows Identity Foundation ( Microsoft TechNet – Lync Server 2013 (

Lync 2013 Server – Cumulative Updates List – September 2015

I needed a precise list of what is on Lync Updates so I managed to insert every useful data in one table.

As well, I give you a simple script which allows you to get the CU version on the Lync Server actually deployed.

Latest update download :


Do not forget the Install-CsDatabase cmdlet if you install the Cumulative Update from October.

Security Update5.0.8308.927September 20153080353Update for Web Components Server

Cumulative Update Lync Server Version Date Released Associated KB Updates Server to Apply
CU 1 5.0.8308.291  February 2013  2781547 Address Book Web Query service
ABS databases
location policy
CU 2 5.0.8308.420  July 2013  2819565 Update for Persistent Chat server
Update for Conferencing server
Update for Unified Communications Managed API 3.0 Workflow APIs
CU 3 5.0.8308.556 October 2013  2881684 Update for Mediation server
Update for Conferencing Announcement
Update for Call Park Service
CU 4 5.0.8308.577 January 2014  2910244 Update for Backup Service
Update for Central Management Server
CU 5 5.0.8308.738 August 2014  2937310 Update for Windows Fabric
Update for Web Conferencing server
Update for Administrative Tools
CU 6 5.0.8308.815 September 2014  2987510 Update for Conferencing Attendant
Update for Core Components
Update for Web Components server
Update for Unified Communications Managed API 4.0, Core Runtime 64-bit
Update for Standard or Enterprise Edition server (Front End Servers and Edge Servers)
CU 7 5.0.8308.831 October 2014 3001616 Update for IM
CU 8 5.0.8308.834 November 2014 3010032 Update for
CU 9 5.0.8308.857 December 2014 3018158 Update for
CU 10 5.0.8308.871 February 2015 3031061 Update for Conference Service
Update for Conference Service
CU 11 5.0.8308.887 May 2015 3051949 Update for URL filter policy (“http://” not filtered)
CU 12 5.0.8308.920 July 2015 3066655 Update for XMPP Gateway
Update for XMPP Proxy
Update for Application Host
Update for Audio Test service
Update for Core Management Server
Update for Backup Service
Update for Unified Communications Managed API 4.0 Runtime
Update for web components server
Update for core components
Update for Call Park service
Update for Conferencing Announcement
Update for Conferencing Attendant
Update for Mediation Server
Update for Administrative Tools
Update for Web Conferencing server
Update for UCMA 3.0 Workflow APIs
Update for Conferencing Server
Update for Persistent Chat
Update for Bandwidth Policy service
Update for Reponse Group Service
Standard Edition server
Enterprise Edition – front-end server and back-end server
Edge server
stand-alone Mediation server
Director server
Persistent Chat front-end server
Administration Tools
Security Update 5.0.8308.927 September 2015 3080353 – MS15-104 Update for Web Components Server


Lync – Get-MCsPool

When you look for a simple way to get all Lync Server topology, you probably will do a Get-CsPool command. But here, you don’t see the sites and the output is not coming in a easily readable way.

The script below will let you Show all information at once.

Get-MCsPool will show you your infrastructure in an easy way :



Communication Server versions tested
Office Communication Server 2007
Microsoft Lync Server 2010 OK
Microsoft Lync Server 2013 OK


Lync 2013 – Activate Unified Contact Store


This post will explain the Unified Contact Store on Microsoft Lync 2013 and Exchange 2013 deployments.


What is this?

This is a feature who will share the contacts between all the Microsoft Office products. In fact, it will store all contact information in Exchange 2013 and make it available for :

  • Lync Client 2013
  • Exchange 2013
  • Outlook 2013
  • Outlook Web Access 2013

This makes the contacts available globally in the organization.



You must be running Microsoft Lync Server 2013 and Exchange 2013.

  • Users must use Lync 2013 to initiate the migration of contacts from Lync Server 2013 to Exchange 2013.
  • User mailboxes must be migrated to Exchange 2013.
  • You must have server-to-server authentication (Oauth) configured between Lync Server 2013 and Exchange 2013.
  • Lync 2010 Client and older versions will not be able to work with UCS (they can only read contacts).

I will explain the process of creating an Oauth partnership with Exchange 2013 in my next post.


Ensure you get all the prerequisites before activating.

In order to test it, create a User Policy that you will assign to you before enabling everyone :

After you see everything is working fine, you can activate UCS for all users, you only need to change the Global User Service Policy using PowerShell:




On outlook 2013, got to Contacts and verify you have the Lync Contacts folder as in the picture :


UCS Outlook

On Lync Client, check the Lync Configuration Information page (Pres Ctrl and right click the Lync icon, then go to Configuration Information).

It may be an entry named Contact List Provider. It may have changed to UCS instead of Lync Server.


UCS Lync Configuration Info

Change Voice Policy of Lync 2013 Response Group Workflow, Dialin, or any other service

There is two ways to change the Voice Policy with Lync 2013.

  • CmdLets
  • Active Directory (advanced)

First of all, we will se how to get the Voice Policy from an Application Endpoint (Workflow, Dialin etc…) :

So if you want to change the voice Policy of a Workflow with powershell, here is the cmdlet :

Now we are going to be more “serious” by going to make changes in the Active Directory for the workflow itself.

First, depending on your environment, the RTC services folder can be found in different paths:

  • [Configuration]/Services/RTC Services/Application Contacts
  • [Domain Naming Context]/Services/Microsoft/RTC Services/Application Contacts

Once you’re in the path, search for the Active Directory Contact object that is your workflow, and modifies the attribute of msRTCSIP-UserPolicies.

It may have some entries like “0=123,1=6,7=2,…”

The “7=” is the voice Policy pointer. So to assign the correct voice Policy number to the Contact, Show the anchors of the voice policies in powershell and add it to the contact.

Powershell Voice Policy Anchor :

This is working for all the policies.


Get-CsActiveCalls – Get Lync Mediation server active calls with powershell



This is a simple script you can use to see which server has active calls (mediation).

This uses the Get-CsWindowsService cmdlet to get the RTCMEDSRV values. This can be useful if you need to restart a server.

If you need only one server, you can also use this command :

Get-CsWindowsService -Name RTCMEDSRV | select activitylevel

To launch the function, just write the function name followed by the computername :

Get-CsActiveCalls computer01,computer02,computer03,computer04

This will show you the active calls like in the picture.

A few modifications : powershell seems to keep all values from before, so we just clear the values after showing the object with Clear-Item.

Communication Server versions tested
Office Communication Server 2007
Microsoft Lync Server 2010 OK
Microsoft Lync Server 2013 OK

Here is the script :