I’m going to show you the quick fix to solve we are preparing a mailbox for the user in office 365.
I struggled with a cloud mailbox issue in a Hybrid environment where in a user had the Exchange Online Plan 2 license but received the error that we are preparing a mailbox for the user in Microsoft 365. I waited for 4 days and tried some steps but unfortunately none of them worked. I was able to fix the error and would like to discuss the same in this article.
I have accessed connect-msolservice module and ensured that no errors on the user account. The command that I used to check the status is below. It’s worth to clear any errors when troubleshooting the mailbox issues.
(Get-MsolUser -UserPrincipalName firstname.lastname@example.org).errors.ErrorDetail.objecterrors.errorrecord.ErrorDescription
The command normally shows any errors on a user account from Azure AD perspective. Thankfully, no errors on the affected mailbox. Also, verified that no email address conflicts with other accounts and all seems to be ok.
I even tried the Redo-MsolProvisionUser command to see if it makes any difference but in vain. Redo-MsolProvisionUser retries the provisioning of a user object in Azure Active Directory.
I decided to try different steps and it worked.
- Access the “Exchange On-Premises PowerShell“
- Disable the affected mailbox. For example, Disable-RemoteMailbox test248 -Confirm:$false
Note: I recommend not to use the Remove-Mailbox command as it removes the AD account that is associated with a mailbox so use the Disable-RemoteMailbox command.
- Wait for the changes to reflect in cloud. After sync is completed, the account will not have a mailbox in cloud but it will be listed in the soft-deleted state which is ok for now.
- Go back to on-premises PowerShell and enable the mailbox and not remote user mailbox. For example, Enable-Mailbox test248. Note: If no AD account is available, then the Enable-mailbox command will not work.
- Allow for a few hours to sync. Once the sync has complete, initiate the migration from on-premises to Exchange Online and assign the appropriate license.
- Guess what? After the migration is completed, we are preparing a mailbox for the user error no longer occurs.
Now, you should be able to move the mailbox contents from the soft-deleted mailbox to the active mailbox using the below command so that the user will have all data.
New-MailboxRestoreRequest -SourceMailbox email@example.com -TargetMailbox firstname.lastname@example.org -AllowLegacyDNMismatch
Source mailbox is the soft deleted mailbox and the target mailbox is the active one.
To get more information, visit the Microsoft website.
Also read: Office 365 Mailbox Doesn’t Exist [SOLVED]
Want to improve your Exchange Online experience for better productivity? Check out the tips and tricks mentioned here.
Now I’d like to hear from you:
Did I miss anything? Or maybe you have a question about something that I covered.
Either way, I’d like to hear from you. So go ahead and leave a comment below.