I will try explain a little about how to integrate Lync 2013 and Exchange Server 2013 OWA.
If you have more than one Microsoft Exchange Server 2013, you will need create the Trusted Application.
Use the follow command to see the Site Name:
Get-CsSite | Select-Object DisplayName, SiteID
Ok, now if you have more than one Exchange Server 2013 you will run this command at Lync Management Shell:
New-CsTrustedApplicationPool -Identity mail.ucsteps.com -Registrar pool.ucsteps.com -Site UCSteps -RequiresReplication $False
Identity: mail.ucsteps.com is the fqdn OWA pool.
Registrar: pool.ucsteps.com is the fqdn registrar pool Lync.
Ok, after this, you must run the follow command.
New-CsTrustedApplication -ApplicationId OutlookWebAppLync -TrustedApplicationPoolFqdn mail.ucsteps.com -Port 5189
ApplicationId: It is only to identify your application.
TrustedApplicationPoolFqdn: here you will use the fqdn OWA pool.
Port: Use an free port, above 1024, not very commom
In this lab, the Exchange Server 2013 services is all in one server.
It is recommended do the IIS Backup and web.config backup.
To do Web.config backup, just copy the file and paste in another folder.
Now, you can see if the Message is enabled and if there are a message type specified.
Get-OwaVirtualDirectory | fl *inst*
In my case, Instant message already enabled. I will run the following command:
Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -InstantMessagingType OCS
But, if your messaging wasn’t enable, run the follow command.
Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -InstantMessagingEnabled $True -InstantMessagingType OCS
Open web.config file:
So, add the follow lines under <appSettings>:
<add key=”IMCertificateThumbprint” value=”0B31FA7D2B1BE651C448D7502300B6EFBC0659EC”/>
<add key=”IMServerName” value=”pool.ucsteps.com”/>
Pay attention, the value=”0B31FA7D2B1BE651C448D7502300B6EFBC0659EC” must be the thumbprint of your certificate and,
value=”pool.ucsteps.com” must be fqdn of the your FE pool.
You can see all the installed certificates with: Get-ExchangeCertificate.
The certificate must be trusted by Lync Server and Exchange Server. Make sure that the SN name appears in SAN name.
So, then, you need allow through the policy to the users send message. You can assign for all:
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -InstantMessagingEnabled $True -InstantMessagingType “OCS”
Or you can assign per policy:
Set-OwaMailboxPolicy -Identity “Default” -InstantMessagingEnabled $True -InstantMessagingType “OCS”
After this, you need restart your pool:
C:\Windows\System32\Inetsrv\Appcmd.exe recycle apppool /apppool.name:”MSExchangeOWAAppPool”
If all had sucessful, you will see the presence status side your name:
You can go up to People and see the status of your contact and then start a conversation.
Nice, When anyone sent a message, an alert appears. Now you can send IM through OWA. Enjoy.