How to export Microsoft Teams chats for a whole company

By Plety. Updated

To export Microsoft Teams chats for a whole company, search every user's and team's Teams content in Microsoft Purview eDiscovery and export it, or have an administrator-approved application pull messages through Microsoft's Teams Export APIs. As of November 2026, the Export APIs reach messages of deleted users, teams and channels for only 30 days, so the export should run before accounts are removed.

Where are Teams chats and channel messages stored?

Teams keeps its primary copy of every message in an Azure-powered chat service, and Microsoft also copies messages into Exchange mailboxes so compliance tools can search them. Microsoft's retention guide for Teams, updated in June 2026, says chat data sits in a hidden folder in the mailbox of each user in the chat, and channel messages in a similar hidden folder in a group mailbox.

Guests are a separate case. A guest using a guest account in the company's tenant has messages stored in a shadow mailbox as well as in the company's users' mailboxes. Someone joining from another Microsoft 365 organisation has their own copy held in that organisation's tenant.

Where Teams content is stored, as of November 2026
ContentWhere Microsoft keeps the compliance copyWhat it means for an export
One-to-one and group chatsA hidden folder in each participant's user mailboxEvery participant holds a copy, so exporting user by user repeats the same messages
Standard channel messagesA hidden folder in the team's group mailboxExported team by team rather than person by person
Private channel messagesUser mailboxes before Microsoft's late-2025 migration, group mailboxes after itCheck which applies before scoping the search
Shared channel messagesSubstrateGroup mailboxesInclude shared channels in the search settings
Files and meeting recordingsSharePoint and group sites for channels; OneDrive for chatsExport them with OneDrive and SharePoint content, not with messages

How do you export Teams chats for a whole company?

Use Microsoft Purview eDiscovery for a one-off export of everything, or the Teams Export APIs if a developer or archiving tool is pulling messages in bulk. In eDiscovery, the export pane has an option to organise conversations into HTML transcripts, and another to include Teams and Viva Engage messages posted in a 12-hour window before and after each matching item. The organisation-wide source can include departed users, guests and shared Teams channels.

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

Supported Teams export routes, as of November 2026
RouteWho can run itWhat comes outLimits
Purview eDiscovery search and exporteDiscovery Manager or Administrator with the Export role; Microsoft 365 E3 or E5 licence for that userChats and channel messages, optionally threaded into HTML transcriptsPackages deleted 14 days after creation; exports cancelled after 7 days running
Teams Export APIs (Microsoft Graph)An application an administrator approves with Chat.Read.All, ChannelMessage.Read.All and User.Read.AllMessages with replies, reactions, attachment details and system messagesExported users need an active Teams licence; deleted users, teams and channels reachable for 30 days

What do the Teams Export APIs need?

An application registered with Microsoft's identity platform, holding application permissions that only an administrator can approve. Microsoft's guide, updated in August 2026, lists Chat.Read.All for one-to-one, group and meeting chats, ChannelMessage.Read.All for channel messages and User.Read.All for the list of users, with separate permissions for meeting transcripts and recordings. It says the users whose data is exported need an active Teams licence, and that no separate data loss prevention licence is required.

The APIs are built for bulk, date-filtered pulls: one call per user for chats and one per team for channels. Each user's call returns both sent and received messages, so running it for every member of a chat produces duplicates; Microsoft offers filters by sender to reduce them. With no payment model declared, Microsoft says access runs in a default evaluation mode with limited usage for each application.

What is lost if accounts are deleted first?

Messages from deleted users, teams and channels can be reached for only 30 days. Microsoft's Export API guide says it captures messages for deleted users up to 30 days from deletion, and messages from deleted teams and channels for a maximum of 30 days, after which they are hard deleted. Messages that users deleted themselves can be reached for up to 21 days.

A retention policy changes this. Microsoft says that if a user covered by a Teams retention policy leaves and their account is deleted, their chat messages are kept in an inactive mailbox and remain available to eDiscovery search. Confirming a retention policy before removing staff accounts therefore keeps their chats available for the export.

Are edited and deleted messages included?

Only where a retention policy or hold has kept them. Microsoft says the Export APIs can return a message's edit history, and messages deleted more than 21 days earlier, from chats and from public and shared channels when the tenant has a Teams retention policy or the user is on hold.

Some content is never kept by Teams retention policies: code snippets, voice memos recorded in the mobile app, thumbnails, announcement images and emoji reactions from others. Chat also carries more personal remarks than email, which is why https://plety-desk.vercel.app/about/questions/can-slack-and-teams-messages-be-used-to-train-ai sets out the extra checks before chat is licensed.

Questions

Are Teams call logs kept?
Microsoft says Teams call logs are retained indefinitely by default, unless a retention policy is set up to delete them.
Do meeting recordings come out with the chat export?
No. Recordings and transcripts are files, and the Export APIs fetch them through separate recording and transcript calls that, as of November 2026, support only private scheduled meetings.
Can messages from people at other organisations be exported?
The copies in the company's own users' mailboxes can be. The external person's own copy sits in their organisation's tenant, outside the company's reach.
Where can staff mailboxes and OneDrive files be exported?
Through the same Purview eDiscovery export, described in the guide at https://plety-desk.vercel.app/about/guides/how-to-export-microsoft-365-mailboxes-and-files.

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