Real-Time UC

A Universal Communications Blog by Office Apps and Services MVP Michael LaMontagne

Bugs CloudPBX Enterprise Voice Lync Office365 Skype for Business

Set-CsHybridMediationServer failure in Skype for Business Online

In-order to escalate a PSTN call from Microsoft’s Cloud Connector Edition (CCE) to a conference in Microsoft’s Audio Conferencing for Skype for Business Online, a Hybrid Mediation Server must be created for each CCE.

Configure online hybrid Mediation Server Settings

When a P2P call is escalated to a PSTN conference, the Skype for Business Online conferencing server will send an invite to the Cloud Connector Mediation Server. To ensure that Office 365 can route this invite successfully, you need to configure a setting in your online tenant for each Cloud Connector Mediation Server as follows:

  1. Create a user in the Office 365 admin portal. Use any user name you want, such as “MediationServer1.”
    Use the default SIP domain of Cloud Connector (the first SIP domain in the .ini file) as the user domain.
    Do not assign any Office 365 licenses (such as E5) to the account you create. Wait for Office 365 AD sync to complete.

  2. Start a tenant remote PowerShell session using your tenant admin credentials, and then run the following cmdlet to set the Mediation Server and Edge Server FQDN to that user account, replacing with the Display Name of the user for the account you created:

PS C:\>Set-CsHybridMediationServer -Identity <DisplayName> -Fqdn <MediationServerFQDN> -AccessProxyExternalFqdn <EdgeServerExternalFQDN>

For Identity, use the Display Name of the Office 365 user account you created for this Mediation Server.
For MediationServerFQDN , use the internal FQDN defined for your Mediation Server.
For EdgeServerExternalFQDN , use the external FQDN defined for Edge Server Access Proxy. If there are multiple Cloud Connector PSTN sites, choose the Edge Server Access Proxy FQDN assigned to the site where the Mediation Server is located.

  1. If there are multiple Cloud Connector Mediation Servers (multiple-site, HA), please repeat the previous steps for each of them.

-Configure Cloud Connector integration with your Office 365 tenant:

Starting February 2018, the second step above to run Set-CsHybridMediationServer against the newly created unlicensed user would fail with a “User not found” / “ItemNotFoundException”:

PS C:\>Set-CsHybridMediationServer -Identity -Fqdn Med-01.ccedomain.local -AccessProxyExternalFqdn  

First thought when hitting this issue was it must be a replication delay, but waiting hours/days had no improvement. It also didn’t matter if the user account for the hybrid mediation server was DirSynced or Cloud. Running a Get-CsOnlineUser did not return the account.

The workaround:

  1. License the hybrid mediation server user account for Skype for Business Online. Make sure the account is returned when running Get-CsOnlineUser.
  2. Remove the Skype for Business Online license (the next step will not complete otherwise). [
  3. Run the Set-CSHybridMediationServer command.
  4. Run the following command against your hybrid mediation server user and record the “WhenCreated”.
PS C:\>Get-CsOnlineUser | fl displayname, whencreated, hostingprovider
  1. At this point CCE should be able to escalate PSTN calls to conferences, but this is a short lived victory. Approximately 30 days after that “WhenCreated” date, more accurately 30 days after removing the Skype for Business Online license… The Office 365 license deprovisioning process is going to trigger. This will reset the HostingProvider property on the user account and break the hybrid mediation server. I ran into this issue before when someone applied a Skype for Business Online license to the hybrid mediation server user after a successful deployment. Which also breaks the account and after removing the license the 30 day reset occurred:
    1. Around the 30 day mark, Run the following command to confirm object existence (I recommend you run the command at least once well before the 30 days to document the expected output):
PS C:\>Get-CsHybridPSTNSite | foreach {Get-CsOnlineUser -Filter "HostingProvider -like '*$($_.edgefqdn)*'" | Get-CsHybridMediationServer}
2. Once the above returns no results, Run the Set-CSHybridMediationServer command.
  1. Now you’re golden, as long as the Skype for Business Online license is not applied again to the hybrid mediation server user everything should remain functioning.

Hugo-Octopress Theme | Powered by Hugo