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 firstname.lastname@example.org | 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 email@example.com | Get-CsOnlineUMMailBox
So onto removing the UM Mailbox:
Get-CsOnlineUser firstname.lastname@example.org | disable-CsOnlineUMMailbox
Let’s try from Exchange Online:
Get-UMMailbox email@example.com | 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 firstname.lastname@example.org | 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 email@example.com | disable-CsOnlineUMMailBox Get-CsOnlineUser firstname.lastname@example.org | get-CsOnlineUMMailBox get-mailbox -Identity email@example.com | get-UMMailbox Get-CsOnlineUser firstname.lastname@example.org | enable-CsOnlineUMMailBox