In the previous blog post we started on provisioning Exchange Online mailboxes for a Lync Hybrid environment where some users are hosted on Lync on-premise and some on Lync On-line. Here in part 2 of this series, we complete the integration between Exchange Online and Lync Hybrid so that users can access all the Lync - Exchange integration features. The table below shows the features that are available with Lync Hybrid and Exchange Online: |
To begin, we first need to export the oAuth certificate from the Lync server. For a FE pool this certificate is typically found on the first FE server installed and can be seen by running the Lync Deployment Wizard on that server and running the Certificate Wizard such as shown below:
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate
$certificate.Import("<complete pathname of oAuthCertificate>")
$binaryValue = $certificate.GetRawCertData()
$credentialsValue = [System.Convert]::ToBase64String($binaryValue)
After the certificate has been imported and encoded, we can then assign the certificate to the Office 365 service principals. To do that, we first create a new Service Principal Credential for Lync using the "New-MsolServicePrincipalCredential" cmdlet with the "AppPrincipalID" for Lync Server which is "00000004-0000-0ff1-ce00-00000000000". To verify this was successful we run the "Get-MsolServicePrincipalCredential" cmdlet to return the results. My example of a completed steps are shown below:
Set-MSOLServicePrincipal -AppPrincipalID 00000002-0000-0ff1-ce00-000000000000 -AccountEnabled $true
$lyncSP = Get-MSOLServicePrincipal -AppPrincipalID 00000004-0000-0ff1-ce00-000000000000
$lyncSP.ServicePrincipalNames.Add("00000004-0000-0ff1-ce00-000000000000/<Your On-Prem Lync External Web Services FQDN>")
Set-MSOLServicePrincipal -AppPrincipalID 00000004-0000-0ff1-ce00-000000000000 -ServicePrincipalNames $lyncSP.ServicePrincipalNames
The completed sequence of cmdlets is shown below:
If all the above steps are completed successfully, we should now be able to login to the Office365 Portal and open Outlook Web App. Then go to the Calendar and create a new event. This time, the Online Meeting icon should display correctly as shown below, and clicking on that icon will create a new Lync online meeting invite with the online meeting join URL. This should work for both users homed on Lync Online and Lync Onprem.