Saturday 12 January 2013

Integrating Lync Server 2013 & Exchange Server 2013 OWA

On Exchange Server 2013
Get the Autodiscover URI using this comand in Exchange Management Shell:
Get-ClientAccessServer | fl fqdn, AutodiscoverServiceInternalURI

You can set the Autodiscover URI using this command:
Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri "https://autodiscover.chahla.local/autodiscover/autodiscover.xml"

In my Case: https://autodiscover.chahla.local/autodiscover/autodiscover.xml
001

On Lync Server 2013
Get the Site name and the Pool FQDN using this comand in Lync Management Shell:
Get-Cspool | where-object {$_.services –like “*UserServer*”} | fl site, fqdn

In my Case: Site is Jeddah and Pool FQDN is Pool01.chahla.local
002

Now we need to access Autodiscover and the Pool from both servers (Exchange & Lync) thru a browser and make sure that we don’t have any certificate issues or warnings.
From Exchange Server: type the URL then enter your credentials.
003
it should look like this, notice that there is no certificate warnings.
004
- The same for pool01.
005

From Lync Server: type the URL then enter your credentials.
003
004
005

Back to Exchange Server:
Configuring an On-Premises Partner Application for Microsoft Lync Server 2013
Type the below commands in Exchange Management Shell:
cd $exscripts
.\Configure-EnterprisePartnerApplication.ps1 -AuthMetadataUrl "https://pool01.chahla.local/metadata/json/1" -ApplicationType Lync
make sure you put your pool fqdn.
Source: http://technet.microsoft.com/en-us/library/jj204975.aspx

006
then do an  iisreset
007
Determine the Certificate Thumbprint
Get-ExchangeCertificate | where-object {$_.services -like "*iis*" } | fl subject, issuer, services, thumbprint
008

My Certificate thumbprint 7D40811E599C1CF8A63770D96D17EC31FB395BE9
009

Now assign the pool name and the certificate thumbprint to OWAVirtualDirectory
Get-OwaVirtualDirectory -ShowBackEndVirtualDirectories -server ex2013-01.chahla.local | where { $_.WebSite -eq `Exchange Back End' } | Set-OwaVirtualDirectory -InstantMessagingEnabled $true -InstantMessagingType OCS -InstantMessagingCertificateThumbprint 7D40811E599C1CF8A63770D96D17EC31FB395BE9 -InstantMessagingServerName pool01.chahla.local
010

Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -InstantMessagingEnabled $true -InstantMessagingType OCS
Source: http://technet.microsoft.com/en-us/library/jj688055.aspx

Now we need to edit web.config file of OWA
Open
C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa
Edit web.config with Notepad
Add the below two keys in the <appSettings> part
<add key="IMCertificateThumbprint" value="7D40811E599C1CF8A63770D96D17EC31FB395BE9" />
<add key="IMServerName" value="pool01.chahla.local" />
011
substitute your thumbprint and pool fqdn.

Then recycle the IIS pool, using this command
C:\Windows\System32\Inetsrv\Appcmd.exe recycle apppool /apppool.name:"MSExchangeOWAAppPool"
012

Finished from Exchange Server part, now on Lync Server.
We need to create a Partner Application, Trusted Application Pool and a Trusted Application.
Partner Application:
New-CsPartnerApplication -identity Exchange -ApplicationTrustLevel Full -MetadataUrl https://autodiscover.chahla.local/autodiscover/metadata/json/1
013
Trusted Application Pool:
New-CsTrustedApplicationPool -Identity ex2013-01.chahla.local -Registrar pool01.chahla.local -Site Jeddah -RequiresReplication $False
Source: http://technet.microsoft.com/en-us/library/jj688055.aspx
014
 
Trusted Application:
New-CsTrustedApplication -ApplicationId OutlookWebAccess -TrustedApplicationPoolFqdn ex2013-01.chahla.local -Port 5199
015
 
Then, Enable-Cstopology for the settings to be published.
016

And we are finished, now we can test it by signing in to OWA and then Sign in to IM from inside OWA.
017
- Sign in to IM.
018

019
- Looks nice.
020

Test IM from another user
021

022

1 New message pops up, accept and start the chat session.
023

024
025

026

Done.











No comments:

Post a Comment