IMPORTANT WARNING:
This process permanently deletes all mailbox data and is NOT recoverable.
Ensure all required data is backed up prior to proceeding using eDiscovery or export tools.
This process permanently deletes all mailbox data and is NOT recoverable.
Ensure all required data is backed up prior to proceeding using eDiscovery or export tools.
Overview
To fully wipe a Microsoft 365 mailbox without deleting the user account, you must:
- Remove the Exchange Online license
- Permanently clear the mailbox using PowerShell
- Reassign the license to provision a new, empty mailbox
Prerequisites
- Microsoft 365 Administrator access
- Ability to connect to Exchange Online PowerShell
Step 1 - Remove Exchange Online License
- Go to the Microsoft 365 Admin Center
- Navigate to Users > Active users
- Select the user
- Open the Licenses and Apps tab
- Uncheck:
- Exchange Online Plan 1 or Plan 2
- Any other Exchange related licenses
- Click Save
This will soft-delete the mailbox. It remains recoverable for approximately 30 days unless permanently cleared.
Step 2 - Connect to Exchange Online PowerShell
Open PowerShell as Administrator and run:
Connect-ExchangeOnline
Step 3 - Permanently Clear Mailbox Data
Run the following command:
Set-User -Identity "<UserPrincipalName>" -PermanentlyClearPreviousMailboxInfo
- Type Y and press Enter when prompted
This immediately and permanently deletes the mailbox data while leaving the user account intact.
Step 4 - Verify Mailbox Removal (Optional)
Run:
Get-User <Identity> | fl *Workload*
Confirm mailbox-related attributes are empty or null.
Step 5 - Reassign Exchange Online License
- Return to Microsoft 365 Admin Center
- Go to Users > Active users
- Select the user
- Open Licenses and Apps
- Re-enable Exchange Online Plan
- Click Save
A brand new, empty mailbox will be created for the user.
Notes
- The mailbox removal may take a few minutes to fully process
- The user account and other services like OneDrive and Teams are not affected
- This is the recommended method when a full mailbox reset is required without deleting the user