Hi @Surya kumar
Thank you for posting your question in Microsoft Q&A.
Based on your description, we understand that you have considered to remove the mailbox from the user account without deleting that account. We are glad to assist you this part. der within
You could follow these steps to troubleshoot it:
Using Exchange Online PowerShell (connect via Connect-ExchangeOnline).
Note: These actions are irreversible, please back up any needed data first via eDiscovery or export tools.
Step 1: Disconnect the Mailbox from the User Account
This clears the mailbox GUID association, resolving any sync mismatches and allowing the user account to remain intact without a mailbox. The mailbox will become disconnected and inactive due to the retention policy.
Run the following command (replace ******@domain.com with the user's primary email or UPN):
Set-User <******@domain.com> -PermanentlyClearPreviousMailboxInfo
You'll get a confirmation prompt warning that this is destructive. Type Y to proceed.
After running this, force an Azure AD Connect sync on-premises (e.g., via Start-ADSyncSyncCycle -PolicyType Delta in the sync server PowerShell) to propagate changes.
Verify: The user should now show no mailbox in the Microsoft 365 admin center or via Get-User ******@domain.com | FL mailbox. The correlation error should resolve as the mismatch is cleared. The old mailbox will appear as inactive via Get-Mailbox -InactiveMailboxOnly.
This step alone "removes" the mailbox from the user (it's no longer linked), but the inactive mailbox persists in Exchange Online due to retention.
Step 2: Identify the Inactive Mailbox and Its Holds
Find the inactive mailbox (replace with the original alias or search by name):
Get-Mailbox -InactiveMailboxOnly -Identity <oldalias> | FL Name, Alias, ExchangeGuid, LegacyExchangeDN, Hold
Note the ExchangeGuid (you'll use this as the identity for later commands).
Check for holds/retention details:
Get-Mailbox <ExchangeGuid> -InactiveMailbox | Select-Object -ExpandProperty InPlaceHolds
This lists hold IDs. Cross-reference with Get-OrganizationConfig | Select-Object -ExpandProperty InPlaceHolds for org-wide holds.
For eDiscovery or compliance holds: Connect to Security & Compliance PowerShell (Connect-IPPSSession) and run Get-RetentionCompliancePolicy or Get-CaseHoldPolicy to identify specifics.
Step 3: Remove Holds and Retention from the Inactive Mailbox
The retention policy prevents hard deletion, so exclude or disable it. Process one hold type at a time, and wait 15–30 minutes between steps for changes to apply (holds can take time to release).
Set-Mailbox <ExchangeGuid> -InactiveMailbox -LitigationHoldEnabled $false
- For Delay Holds (common after recent policy changes):
Set-Mailbox <ExchangeGuid> -InactiveMailbox -RemoveDelayHoldApplied
- For Organization-Wide Retention Policies (most common for preventing hard deletes):
Set-Mailbox <ExchangeGuid> -InactiveMailbox -ExcludeFromAllOrgHolds $true
- For Specific Retention Policies or Labels:
If it's a targeted policy, use Set-RetentionCompliancePolicy -Identity <PolicyGuid> -RemoveExchangeLocation ******@domain.com.
- For eDiscovery Case Holds:
Use Set-CaseHoldPolicy -Identity <PolicyName> -RemoveExchangeLocation ******@domain.com.
- For App-Specific Retention (e.g., Teams/OneDrive if applicable):
Temporarily disable the policy via Set-AppRetentionCompliancePolicy -Identity <PolicyName> -Enabled $false, wait up to 24 hours, then re-enable after deletion.
Re-run the hold check command from Step 2 after each change to confirm removal. If any holds remain, the deletion will fail.
Step 4: Permanently Delete the Inactive Mailbox
Once all holds are removed, the mailbox becomes soft-deleted. You can then purge it immediately:
Run:
Remove-Mailbox <ExchangeGuid> -PermanentlyDelete -Force
Verify it's gone: Get-Mailbox -InactiveMailboxOnly -Identity should return nothing.
Note:
Hybrid Considerations: Since the account is AD-sourced and RemoteRecipientType is None, this indicates the mailbox wasn't properly set as a remote mailbox on-premises (e.g., via Enable-RemoteMailbox). The above steps handle it as a cloud-disconnected mailbox. If sync errors persist post-Step 1, check Azure AD Connect health for conflicts and consider resetting attributes like msExchMailboxGuid on-premises via ADSI Edit (set to null, then resync).
Permissions: You need Exchange Admin or Compliance Admin roles. If errors occur (e.g., "can't find mailbox"), double-check the GUID.
If you need further assistance, please let us know.
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.