EASYENTRA Blog

News & Updates

How to Handle OneDrive and Email Retention When a Microsoft 365 Employee Leaves 

How to Handle OneDrive and Email Retention When a Microsoft 365 Employee Leaves

When an employee leaves an organization, two of the most important Microsoft 365 resources to handle are their Exchange Online mailbox and OneDrive data.

Simply blocking sign-in or removing the user’s Microsoft 365 license is not enough. Administrators need to decide who should receive the employee’s files, whether their email address should continue receiving messages, and how long their existing mailbox data needs to remain available.

The order of these actions also matters. Deleting the user starts the OneDrive deleted-user retention process, while converting the mailbox to a shared mailbox requires the associated account to remain. Removing licenses too early can also affect access to Exchange Online data.

A proper offboarding process should therefore determine how both OneDrive and email will be handled before the employee’s account is deleted or licenses are removed.

What Happens to OneDrive When an Employee Leaves?

A user’s OneDrive is tied to their Microsoft 365 account, but deleting the user does not immediately delete their files. When the user account is deleted from Microsoft Entra ID, the OneDrive retention period begins. By default, the deleted user’s OneDrive is retained for 30 days, although administrators can configure a different retention period.

If the departing employee has a manager specified in Microsoft Entra ID and automatic access delegation is enabled, the manager is automatically granted access to the employee’s OneDrive. The manager also receives an email explaining that the OneDrive will be deleted at the end of the retention period.

If no manager is configured, organizations can configure a secondary owner to receive access instead. During this period, important files should be reviewed and moved to an appropriate location rather than left in the former employee’s OneDrive.

Seven days before the retention period expires, Microsoft sends another notification to the manager or secondary owner. After the OneDrive retention period expires, the OneDrive is moved to the site collection recycle bin and retained there for another 93 days. Normal access to its shared content is no longer available at this stage, and an administrator must use PowerShell if the OneDrive needs to be restored.

Delegate OneDrive Data with EasyEntra

Instead of waiting until the user is deleted to determine who needs access to their files, administrators can also handle OneDrive data as part of the offboarding process in EasyEntra.

EasyEntra allows an administrator to assign another user as a site collection administrator for the departing employee’s OneDrive. This gives the delegate full control of the OneDrive site so that required business files can be reviewed or transferred before the account is removed.

This can be configured from: User Properties → OneDrive → OneDrive Delegation.

 

If a separate copy of the employee’s files is required, EasyEntra can also export the OneDrive to a ZIP file. This provides a compressed copy of the user’s OneDrive files and folders that can be stored outside the original OneDrive.

For automated workflows, EasyEntra PowerShell provides the following cmdlet.

Invoke-EEOneDriveToZip -Identity "user@contoso.com"

The PowerShell export can also be used for bulk or scheduled exports and supports options such as modification-date filtering, maximum file size, and splitting larger exports into multiple ZIP files.

This gives administrators two different options during offboarding: delegate access when someone needs to review or transfer the existing OneDrive, or export the data when a separate copy needs to be preserved.

OneDrive Retention Does Not Start When You Remove the License

There is an important distinction between removing a license and deleting the user account. The standard deleted-user OneDrive cleanup process begins when the user is deleted from Microsoft Entra ID. Simply removing the user’s license does not trigger this process. Administrators should therefore avoid treating license removal and account deletion as the same offboarding action.

What Happens to the Employee’s Email in Microsoft 365?

Exchange Online follows a different lifecycle. Before removing the employee’s Exchange Online license or deleting their account, administrators should first decide what the organization needs from the mailbox. In most offboarding scenarios, the requirement falls into one of two categories:

Continued business access: Another employee needs to open the mailbox, review previous conversations, respond to customers, or continue receiving messages sent to the former employee.

Long-term retention: Nobody needs to use the mailbox regularly, but its contents must be preserved for compliance, legal, investigation, or organizational retention requirements.

The appropriate mailbox strategy depends on which requirement applies.

Option 1: Convert the Mailbox to a Shared Mailbox

A shared mailbox is generally the more practical option when another employee needs ongoing access to the departed employee’s email. When a user mailbox is converted to a shared mailbox, its existing email and calendar information is retained. Administrators can then grant appropriate users access to the mailbox.

Microsoft specifically advises administrators not to delete the former user’s account after converting the mailbox, because the account is required to anchor the shared mailbox.

Export Ex-Employee Email to PST with EasyEntra

Another option is to preserve a separate copy of the former employee’s email before completing the offboarding process. EasyEntra supports exporting Exchange Online email to a PST file directly through its graphical interface.

The export is available from: User Properties → Mailbox → Mailbox Storage → Export.

Administrators can specify an output location and optionally select a start and end date if only email from a particular period needs to be exported.

The same process can be automated with EasyEntra PowerShell using the below cmdlet.

Invoke-EEMailboxToPst -Identity "user@contoso.com"

This makes PST export suitable for repeatable or scheduled offboarding workflows where email needs to be exported before the employee’s account is decommissioned.

One important limitation is that EasyEntra’s PST export currently exports email messages only. Contacts and calendar events are not included, and the exported PST should be verified after the process completes.

A PST export should also not be considered a replacement for Microsoft 365 retention or an inactive mailbox when the organization has legal, regulatory, or eDiscovery requirements. Instead, it provides an additional portable copy of the employee’s email when one is required.

Can the Exchange Online License Be Removed?

In many cases, yes. After the mailbox has been successfully converted to a shared mailbox, the former employee’s license can generally be removed if the shared mailbox stays within Microsoft’s unlicensed shared mailbox limits.

An unlicensed shared mailbox is limited to 50 GB. Licensing may still be required when the mailbox exceeds 50 GB or when features such as certain archiving or hold capabilities are required. Administrators should therefore verify the mailbox size, archive configuration, and retention requirements before removing the license.

Option 2: Preserve Email as an Inactive Mailbox

A shared mailbox is not necessary when nobody needs regular access to the employee’s inbox. If the organization only needs to retain the employee’s mailbox for compliance or historical purposes, an inactive mailbox may be more appropriate.

Unlike a shared mailbox, an inactive mailbox is not intended for another employee to open in Outlook and continue using. Instead, retained content can be searched and managed through supported Microsoft Purview and eDiscovery workflows.

How an Inactive Mailbox Changes the Offboarding Process

An inactive mailbox must be prepared before the user is permanently removed. A typical workflow is:

  1. Determine the organization’s mailbox retention requirements.
  2. Apply an appropriate Microsoft 365 retention policy or supported hold to the mailbox.
  3. Confirm that the retention configuration has taken effect.
  4. Prepare and transfer the user’s OneDrive data.
  5. Delete the Microsoft 365 user account.
  6. Allow Exchange Online to preserve the mailbox as an inactive mailbox.
  7. Reassign the released license when appropriate.

Once the inactive mailbox has been created, it no longer requires a user subscription license. This approach also allows the Microsoft Entra user to be removed rather than retained simply to maintain access to historical email.

What’s the Better Way to Manage Ex-Employee Emails: Shared Mailbox or Inactive Mailbox?

The decision becomes easier when administrators focus on how the mailbox will be used after the employee leaves.

RequirementShared MailboxInactive Mailbox
Another employee needs regular mailbox accessYesNo
Former email address should continue receiving messagesYesNo
Users need access through OutlookYesNo
Primary purpose is long-term retentionNot primarilyYes
Suitable for compliance/eDiscovery preservationDepends on configurationYes
User account can be deletedNo, the account anchors the shared mailboxYes
Former employee’s license can eventually be releasedUsually, subject to mailbox requirementsYes
OneDrive needs to be handled separately before account deletionYesRecommended before deletion

If the mailbox needs to remain operational, a shared mailbox is usually the appropriate approach. 
If the data only needs to be retained, an inactive mailbox provides a retention-focused alternative.

What If No Mailbox Retention Action Is Taken?

Administrators should not assume that Exchange Online will preserve a departed employee’s mailbox indefinitely. When a Microsoft Entra user account is deleted, the associated Exchange Online mailbox normally enters a soft-deleted state. Exchange Online retains a soft-deleted mailbox for 30 days. If the user account is restored during the applicable recovery period, the mailbox can also be restored.

Similarly, removing an Exchange Online license from a regular mailbox without an applicable hold disconnects the mailbox. Microsoft provides a limited period in which the license can be reassigned to restore access. Once the applicable recovery period expires and no retention mechanism protects the mailbox, the data can become permanently unrecoverable.

For this reason, mailbox retention should be decided before license removal or account deletion, not afterward.

Recommended Offboarding Order for OneDrive and Email

The safest approach is to handle data before removing the identity that owns it.

A practical sequence is:

  1. Block the employee’s sign-in and revoke existing access as required.
  2. Review the employee’s mailbox and OneDrive before deleting anything.
  3. Identify who needs the OneDrive files and where those files should permanently reside.
  4. Decide how the mailbox will be used after departure.
  5. Convert it to a shared mailbox if another employee needs continued operational access.
  6. Use an inactive mailbox strategy if email only needs to be retained for compliance or historical purposes.
  7. Transfer important OneDrive files to the appropriate employee or SharePoint location.
  8. Verify mailbox and OneDrive access before removing licenses.
  9. Delete or retain the user account according to the mailbox strategy.
  10. Remove or reassign licenses only after the required data has been secured.

OneDrive and Exchange Online should not be treated as a single resource during employee offboarding. The most important step is to decide what needs to happen to the employee’s files and email before deleting the account or removing licenses.

For OneDrive, identify who should receive the files and move important business data to a permanent location. For Exchange Online, determine whether the mailbox needs continued operational access or long-term retention.

Making those decisions first helps prevent a routine account cleanup from turning into an unexpected data recovery exercise!

 

Free 30-minute demo

try 30 days for free

GET EASYENTRA NEWS

Opt out at any time

“One of the best products I've used.”
Gary Shurland
Chief Information Officer, Mirick, United States
“This tool has been invaluable in streamlining our IT processes.”
Tyson Mckay
Chief Information Officer, Southwest Network, United States
“This product has been a miracle for our Help Desk. EasyEntra has completely transformed how we handle Microsoft 365 administration.”
Doug Sanders
Manager of Technical Customer Support, Junior Achievement USA, United States
“Your product is such a time saver. I love it!”
Scott Fehr
IT Infrastructure, MEC Aerial Work Platforms, United States
“It's a good product and saves us lots of time for these ongoing quick admin tasks.” 
Chris McFerran
Managing Director, CTech IT Solutions Ltd, United Kingdom
“EasyEntra has significantly streamlined our workflow, simplifying everything. It feels almost like a revolution.”
Johan Sadelius
IT-chef, Arjeplog Kommun, Sweden
I greatly appreciate your assistance and willingness to enhance the already outstanding product.”
Michael I. Wilson
Executive Director of Information Technology, Archdiocese Of Washington, United States
“It's great not having to switch back and forth between the O365 admin center and the Teams admin center to assign groups. I am sold!”
Thomas Madden
Director Information Technology, AutoPayPlus, United States
“I would highly recommend organizations use the solution as it greatly simplifies various tasks.”
S. Roger Singh
Chief Technology Officer, Prasad & Company LLP, Canada
“EasyEntra is time-saving. Love the copy/paste for user/computer groups and the copy to new user.”
Damian Nita
Associate Network Administrator, Shenandoah Valley Westminster-Canterbury, United States
“EasyEntra has transformed our daily IT operations by simplifying user management, reducing errors, and enhancing overall efficiency.”
Henrik Nefling
IT- and Digitalization Manager, Animal Protection Denmark, Denmark