Exchange Online: Remove-Mailbox: The following error occurred during validation in agent ‘Windows LiveId Agent’: ‘Unable to perform the save operation. ‘SharedMailboxName’ is not within a valid server write scope.’


All you want to do is delete a Shared Mailbox in Exchange Online. But it is stupidly stubborn. It doesn’t want to delete. All you get is

Remove-Mailbox: The following error occurred during validation in agent ‘Windows LiveId Agent’: ‘Unable to perform the save operation. ‘SharedMailboxName’ is not within a valid server write scope.’

SOLUTION: Delete the related Azure AD user account. In the following example, I removed related MSOL user account, that also removes the shared mailbox.

Get-MsolUser -UserPrincipalName stubbornsharedmailbox@company.com | Remove-MsolUser -Force

You can also use AzureAD PowerShell cmdlet or Azure AD console in Azure to remove the user account.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s