Real-Time UC

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

Azure Voicemail CloudPBX Enterprise Voice Office365 Skype for Business

Enable-CsOnlineUMMailbox results in 500 Internal Server Error

While onboarding a new customer with CloudPBX in Skype for Business Online, I came across an issue enabling the client APIs for use with Azure Voicemail. Normally, this is a simple one-liner in PowerShell:

Get-CsOnlineUser | Enable-CsOnlineUMMailbox

But today was a different story… The Enable-CsOnlineUMMailbox started to bleed “The remote server returned an error: (500) Internal Server Error”.

Next was to see if the UM Mailbox was created.

Get-CsOnlineUser | Get-CsOnlineUMMailBox

I found the UM Mailbox was partially created but was missing the UM Mailbox Policy, as well as the Extension.

So onto removing the UM Mailbox:

Get-CsOnlineUser | disable-CsOnlineUMMailbox

Same error, “The remote server returned an error: (500) Internal Server Error”.

Let’s try from Exchange Online:

Get-UMMailbox | Disable-UMMailbox

A new error, “The operation couldn’t be performed because ‘mark’ matches multiple entries.”

Checking via the Exchange Online admin center, I could see Unified Messaging was enabled.

Attempting to “View details” for Unified Messaging on the account returned a lovely, “Cannot convert value “mark” to type…….”

Disabling Unified Messaging from the Exchange Online admin center displayed “user is already disabled for Unified Messaging” and showed Unified Messaging as “Disabled”. Until clicking refresh in the browser, and it was back to “Enabled”.

Being how the error both in Exchange Online admin center and PowerShell referenced the user’s mailbox (“mark”) vs. the email address in the error, I decided to run a quick query:

Get-Mailbox mark* |ft name*, alias*

Bingo, the alias of “mark” was used on two different mailboxes. Don’t ask me how the customer pulled that off. I would have thought Exchange Online mailbox creation for cloud users would error on duplicate alias.

Using the Exchange Online admin center, I modified the Alias on one of the accounts.

In Exchange Online, I enabled the UM Mailbox again:

Get-Mailbox -identity | Enable-UMMailbox -UMMailboxPolicy 'BusinessVoice_8D_DialPlan Default Policy'

This worked, but I noticed the Extension was the user’s mobile number and not the LineURI set in Skype for Business Online.

Running the original Enable-CsOnlineUMMailbox command seemed to correct the Extensions.

To be safe, I disabled the UM Mailbox again via Skype for Business Online, confirmed it was also removed from Exchange Online and recreated in Skype for Business Online once again:

Get-CsOnlineUser | disable-CsOnlineUMMailBox
Get-CsOnlineUser | get-CsOnlineUMMailBox
get-mailbox -Identity | get-UMMailbox
Get-CsOnlineUser | enable-CsOnlineUMMailBox

The “View details” in Exchange Online admin center started working as well.

Hugo-Octopress Theme | Powered by Hugo