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 email@example.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 firstname.lastname@example.org | Get-CsOnlineUMMailBox
So onto removing the UM Mailbox:
Get-CsOnlineUser email@example.com | disable-CsOnlineUMMailbox
Let’s try from Exchange Online:
Get-UMMailbox firstname.lastname@example.org | Disable-UMMailbox
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.
In Exchange Online, I enabled the UM Mailbox again:
Get-Mailbox -identity email@example.com | Enable-UMMailbox -UMMailboxPolicy 'BusinessVoice_8D_DialPlan Default Policy'
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 firstname.lastname@example.org | disable-CsOnlineUMMailBox Get-CsOnlineUser email@example.com | get-CsOnlineUMMailBox get-mailbox -Identity firstname.lastname@example.org | get-UMMailbox Get-CsOnlineUser email@example.com | enable-CsOnlineUMMailBox