Unable to access an account or mailbox. Error: ErrorMailboxConfiguration
Important: The steps in this article require that you connect to Office 365 with Windows PowerShell. Refer to the Connect to Office 365 PowerShell article from Microsoft for detailed steps on how to connect to Office 365 using Windows PowerShell.
This error can occur when more than one account exists in the Office 365 tenant. A common scenario is when a user was put on litigation hold, deleted, and then re-created. The account on hold is in soft delete; attempting to access this user via EWS will cause this error.
For an account named email@example.com, an easy way to confirm the scenario is to run to following PowerShell command:
Get-Mailbox -IncludeInactiveMailbox fail | fl Alias,IsSoftDeletedByRemove,LitigationHoldEnabled Alias : fail IsSoftDeletedByRemove : True LitigationHoldEnabled : True Alias : fail IsSoftDeletedByRemove : False LitigationHoldEnabled : False
This shows that there is only one active user, and one soft deleted because the LitigationHold is enabled.
The only way to fix the configuration error is to remove that user. The litigation hold will have to be removed.
First, remove the litigation hold on the inactive user:
Set-Mailbox fail -InactiveMailbox -LitigationHoldEnabled $false
Confirm if there is a deleted user:
Get-MsolUser -ReturnDeletedUsers UserPrincipalName DisplayName isLicensed ----------------- ----------- ---------- firstname.lastname@example.org fail False
Remove that user with the following command:
Remove-MsolUser -UserPrincipalName email@example.com -RemoveFromRecycleBin Confirm Continue with this operation? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Confirm if there is still an inactive Mailbox for that user:
Get-Mailbox –InactiveMailboxOnly Name Alias ServerName ProhibitSendQuota ---- ----- ---------- -----------------
fail fail by2pr11mb0504 49.5 GB (53,150,220,288 bytes)
If there is, it may be necessary to manually delete the Mailbox for that user:
Get-Mailbox -InactiveMailboxOnly fail | Remove-Mailbox