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 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.

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.

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

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…