How to export Microsoft 365 mailboxes and OneDrive files before closing

By Plety. Updated

To export all Microsoft 365 mailboxes and OneDrive files before closing a company, an eDiscovery Manager runs an organisation-wide search in Microsoft Purview and exports it: mail as PST or .msg files, documents in their native formats. As of November 2026, Microsoft deletes search export packages 14 days after they are created, so they need downloading promptly.

How do you export all Microsoft 365 mailboxes and OneDrive files?

Use Microsoft Purview eDiscovery: create a case, run a search across all people and groups, then export the results. Microsoft's export guide, updated in October 2026, says mailbox items download as PST files or individual messages, and SharePoint and OneDrive content downloads as copies of native Office and other documents. The organisation-wide source can be set to include unlicensed users, guests, shared Teams channels and departed users.

Exports come as zip packages. PST files can be capped at 1, 2, 5 or 10 GB (5 GB by default) and zip packages at 2, 10, 20 or 40 GB (10 GB by default). Document exports can include the latest version, the last 10 or 100 versions, or all versions. An export that runs for more than seven days is cancelled automatically, so Microsoft advises splitting very large exports by date range or data source.

An export is a copy that stays inside the company's control, and personal data is removed inside the company's own systems before anything goes to a buyer, as set out at https://plety-desk.vercel.app/about/questions/how-is-personal-data-removed-from-business-records.

Who can run the export, and which licence is needed?

A member of the eDiscovery Manager role group can, because that group holds the Export role. As of November 2026, Microsoft's export guide also says the eDiscovery user needs a Microsoft 365 Enterprise E3 or E5 licence, and a SharePoint E3 licence for SharePoint content to export as expected. Assigning the roles needs membership of the Organization Management role group or the Role Management role.

An eDiscovery Manager sees only the cases they create, while an eDiscovery Administrator can reach every case in the organisation. Microsoft advises limiting the number of eDiscovery Administrators, because they can see sensitive information in search results.

Microsoft 365 export routes and clocks, as of November 2026
RouteWhat it coversWho runs itClock to watch
Purview eDiscovery exportExchange mailboxes as PST or .msg files; OneDrive and SharePoint documents with chosen versionseDiscovery Manager or Administrator with the Export rolePackages deleted 14 days after creation; exports cancelled after 7 days running
Inactive mailboxMail of a deleted user kept by a hold or retention policy applied before deletionA compliance admin sets the policy; eDiscovery exports itWithout a hold, a removed account's mail is kept for 30 days, then permanently removed
OneDrive of a deleted userThe departed user's files, opened by their manager or a secondary ownerSharePoint admin sets access delegation and the retention period30 days by default, then 93 days in the site collection recycle bin
Subscription lifecycleAll customer data in the organisation's subscriptionGlobal or billing adminExpired 30 days, Disabled 90 days, then Deleted, for most offers

What about staff who have already left?

Their mailboxes survive only if a hold was in place before the account was deleted. Microsoft's inactive mailbox guide, updated in August 2026, says a removed account's mailbox data is kept for 30 days and then permanently removed. If a hold is applied first, the mailbox becomes an inactive mailbox, kept for the retention period. Microsoft recommends a Microsoft 365 retention policy for this, confirmed as applied before the account is deleted.

OneDrive has its own clock. When a user is deleted, their manager, or a secondary owner if no manager is set, gets access for 30 days by default and a reminder seven days before the end. The OneDrive then moves to the site collection recycle bin for 93 days. Microsoft also says unlicensed OneDrive accounts are archived on their 93rd unlicensed day, and that after 12 months of unpaid archive the data might be deleted regardless of retention settings or holds.

What happens to the data when the subscription ends?

It moves through Expired, Disabled and Deleted, and then it is gone. Microsoft's page, updated in June 2026, says that for most offers data stays accessible to everyone for 30 days after expiry and to admins only for 90 days in the Disabled stage, and is then deleted; a deleted subscription cannot be reactivated. The stages, and a February 2026 change for some Microsoft Customer Agreement subscriptions, are covered at https://plety-desk.vercel.app/about/insolvency/getting-access-to-company-systems-after-appointment.

Two further points matter when closing. A subscription cancelled within its cancellation window skips Expired and goes straight to Disabled, and Microsoft says data left behind might be deleted after 90 days and will be deleted no later than 180 days after cancellation. If a subscription is explicitly deleted, SharePoint and OneDrive data is deleted immediately. So the export comes before anyone cancels or deletes anything.

Where should the exported files be kept?

On storage the company controls, for as long as the longest legal retention period that applies to them. GOV.UK tells directors of a struck-off company to keep business documents such as bank statements, invoices and receipts for 7 years after the company is struck off, and mailboxes often hold exactly those documents.

Keep a note of what each package covers: the mailboxes and sites, the date range and the export options chosen. Microsoft's export produces an item report showing each item's original location, which is worth keeping with the files. Plety never holds, views or passes on records, samples, logins or money.

Questions

Can each mailbox come out as its own PST file?
Yes. Microsoft says that when the export organises data by location, each mailbox goes into a separate PST file named after it, with items from its archive mailboxes merged in.
Can export download links be sent to an adviser or buyer?
Microsoft says export download links are for individual use only. If outside parties need the files, an authorised user should download them and share them through the organisation's own access-controlled channels.
Does removing a user's licence start the OneDrive deletion clock?
No. Microsoft says the OneDrive cleanup clock starts only when the user account is deleted from Microsoft Entra ID, although an unlicensed OneDrive is archived on its 93rd unlicensed day.
Are Teams chats part of the same export?
Teams chats are copied into Exchange mailboxes and can be searched and exported with the same eDiscovery tools. The guide at https://plety-desk.vercel.app/about/guides/how-to-export-microsoft-teams-chats covers them.

Want to know what your records could fetch?

Email Herman or book a 30-minute call. We tell you which buyers fit before anything else happens.

Sources

This page is general information, not legal advice. Take advice on your own company's records and contracts.

Read next