Enable-CsOnlineUMMailbox results in 500 Internal Server Error

By | January 30, 2017

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 user@domain.com | 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 user@domain.com | 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 user@domain.com | disable-CsOnlineUMMailbox

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

Let’s try from Exchange Online:

Get-UMMailbox user@domain.com | 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 user@domain.com | 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 user@domain.com | disable-CsOnlineUMMailBox
Get-CsOnlineUser user@domain.com | get-CsOnlineUMMailBox
get-mailbox -Identity user@domain.com | get-UMMailbox
Get-CsOnlineUser user@domain.com | enable-CsOnlineUMMailBox

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

One thought on “Enable-CsOnlineUMMailbox results in 500 Internal Server Error

  1. joanlben3

    This was SOOOO helpful. Like your customer, we had an accounts with matching aliases – due to the onmicrosoft.com vanity domain. Everything seemed to be functioning, but the VVX phones gave the canary warning. Thanks so much for posting! We’re beginning our Cloud PBX migration – which is an adventure. Even things that seem obscure happen more than we’d like…


Leave a Comment