Dear @Admin Coterena,
Please understand that our forum is a public platform, and we will modify your question to cover the personal information of your organization in the description. Kindly ensure that you hide these personal or organization information next time you post error or some information to protect personal data.
Welcome to Microsoft Q&A Forum!
Thank you for your message regarding the mail flow issue between Office 365 and your on-premises Exchange environment. Based on your description, it appears that the user ******@XXXX.com currently has two mailboxes, one in Exchange Online (Office 365) and one on-premises, and they have the same email address. This configuration may not supported by Microsoft, and it may lead to mail delivery issues, such as emails being delivered only to the cloud mailbox.
Microsoft recommends that each user should have only one mailbox, either in Exchange Online or on-premises, to avoid such conflicts. You can refer to the official guidance here: How to recover when a mailbox exists in both Exchange Online and on-premises - Exchange | Microsoft…
Also, you can consult more information in the link above (please kindly check scenario 2) and combine with suggested article in that section: Permanently Clear Previous Mailbox Info | Microsoft Community Hub
Besides that, if your goal is to keep mail delivery on-premises, I recommend removing the cloud mailbox and ensuring proper hybrid configuration so that Office 365 routes mail to your on-prem Exchange server. Here are several steps to resolve it (remove cloud mailbox, route to on-prem):
These steps assume a hybrid setup with Azure AD Connect syncing users from on-prem. Backup any data in the cloud mailbox first (e.g., export to PST), as this permanently deletes it. Please kindly run this test on a non-production user if possible (doing these in Exchange Online).
1.Remove the Exchange Online license:
- Go to the Microsoft 365 admin center > Users > Active users.
- Select the user (******@XXXX.com).
- Under Licenses and apps, uncheck the Exchange Online license (or the bundle containing it, like Microsoft 365 E3/E5).
- Save changes. This converts the mailbox to a "soft-deleted" state but leaves residual info.
2.Connect to Exchange Online PowerShell:
- Install the Exchange Online PowerShell module if needed (
Install-Module -Name ExchangeOnlineManagement). - Run:
`Connect-ExchangeOnline -UserPrincipalName ******@company.com`
3.Verify the user's current state (optional but recommended):
- Run:
`Get-User ******@XXXX.com | Select Name, *Recipient*` - Look for PreviousRecipientTypeDetails showing "UserMailbox". This confirms residual mailbox info.
4.Permanently clear the previous mailbox info:
- Run:
`Set-User -Identity ******@XXXX.com -PermanentlyClearPreviousMailboxInfo` - Confirm with "Y" when prompted. This deletes all pointers to the old cloud mailbox (GUID, home MDB), making the data unrecoverable.
- Wait up to 24 hours for full processing, but mail flow should improve sooner.
5.Force Azure AD Connect sync (if needed, to update the cloud object):
- On your on-prem sync server, run:
`Start-ADSyncSyncCycle -PolicyType Delta` - This ensures the cloud object gets updated with on-prem attributes, setting it as a MailUser with the remote routing address.
6.Test mail flow:
- Send an email from a cloud user to ******@XXXX.com.
- It should now relay via your outbound connector to the on-prem mailbox.
- Monitor with
`Get-MessageTrace`in Exchange Online PowerShell.
If the duplicate was caused by a sync issue (e.g., missing ExchangeGUID from on-prem), check your Azure AD Connect health and ensure the on-prem mailbox has a valid GUID (Get-Mailbox jXXX | fl ExchangeGuid). If problems persist after this, re-run the Hybrid Configuration Wizard to validate connectors and domains.
I hope this information can help you in this case and please kindly correct me if I misunderstand your concern. Wish you a pleasant day!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.