Better Together Part 1 : Lync Instant Messaging and Presence in OWA

Microsoft has been promoting a theme called “Better Together”. You can read all about it here.

The essence of this theme is that Microsoft products are powerful on their own, but they are even more powerful when integrated into other products. Today we are going to look at one of those scenarios that I configured recently. Have you ever been without your laptop/cell phone, maybe on a public computer in a bookstore or at a friends house and logged in to OWA and wished that somehow Lync and OWA were integrated so instead of emailing this person you wished you could communicate with them in real time. Well you now you can with a little bit of configuration.

What is required?

  • Lync 2013
  • Exchange 2013
  • Internal Certificate

For the purpose of this post I will use internal server names as opposed to external FQDN’s, except for OWA.



Configuring Exchange 2013


  1. Create/get a certificate from a certificate authority that both Exchange and Lync trust
  2. Enable Instant Messaging on the OWA virtual Directory
  3. Configure the web.config file in for OWA
  4. Restart the Exchange OWA App pool

Step 1

Because the traffic between OWA and Lync is encrypted you need to use a certificate. For the purpose of this exercise I used Exchange to create the certificate request to my domain certificate authority. I will breeze over this topic quickly but basically I created a cert request with exchange.domainname.local as my primary name, and lync.domainname.local and as my subject alternative names



Step 2

Next we need to enable instant messaging in OWA for Lync. To do this we will open up the Exchange and use the following command

Get-OwaVirtualDirectory | Set-OwaVirtualDirectory –InstantMessagingEnabled $True -InstantMessagingType OCS

Step 3

Navigate to program directory. In my case it’s C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa

You can use notepad to edit the web.config file or whatever program you like really, important thing is to open the program as administrator so you can save into this directory. Once this file is open navigate to <appsettings> <\appsettings> and add the following lines. I like to put it last in the list just above <\appsettings> so it’s easy to find.

<add key=”IMCertificateThumbprint” value=”28502B3A84855A6F006EC6E4951A913B5C79F614″/>
    <add key=”IMServerName” value=”lync.domainname.local”/>


Step 4

Recycle Microsoft Exchange OWA App Pool

To do this in powershell

Appcmd recycle apppool / MSExchangeOWAAppPool

This can also be done in IIS by locating the App Pool, click on it and on the right site click recycle.

Lync Configuration

Step 1

On your lync front end server, start your Lync topology builder. Navigate to Trusted application servers and create a new Trusted Application Pool. Your pool FQDN should be the name of your exchange server. Click Next and select the Lync Server that will be your next hop pool.

Once this is completed you will see that your exchange server is in the Trusted application servers list.

Make sure you publish your topology.

Step 2

Now we must create the trusted application that links to the trusted application pool we’ve created in the previous step.

Open Lync management shell and use the following command

New-CsTrustedApplication -ApplicationID OutlookWebApp -TrustedApplicationPoolFqdn exchange.domainname.local -Port 5199


Before you exit the Lync management shell make sure you finish with enable-cstopology

The final step here is to restart IIS on your Exchange server. Do this after hours, I didn’t expect this but when I restarted my IIS server, it also drained my Lync front end so connectivity was lost for 5 minutes or so. If you know why this happened please share with me.

So what now?

Now you should have the ability to IM within OWA. It looks like this. Drum roll please


Leave a comment

Your email address will not be published.