Skip to content
Outrich Data

Export guide · Checked against Microsoft Teams documentation 2026-11-17

How to export all your data from Microsoft Teams

Teams data is exported through two official routes. An admin in the eDiscovery Manager role group exports chats and channel messages from a case in the Microsoft Purview portal as PST files, .msg files or HTML transcripts. Developers can pull the same messages as JSON through the Teams Export APIs in Microsoft Graph.

Who can export from Microsoft Teams

For the portal route you need eDiscovery permissions. Microsoft's primary role group is eDiscovery Manager, which includes the Export role and lets members create cases, run searches and export results. An eDiscovery Manager only sees the cases they created or belong to, while an eDiscovery Administrator can access every case. Assigning these permissions takes membership of the Organization Management role group or the Role Management role.

At the time of checking, Microsoft says the eDiscovery user must hold a Microsoft 365 Enterprise E3 or E5 license to export content, plus a SharePoint E3 license when the export includes SharePoint content, which is where Teams channel files live.

The Teams Export APIs are a developer route. They use application permissions that only an administrator can approve, and Microsoft requires an active Teams license for the users whose data is exported. With no licensing model declared, an app runs in evaluation mode, which Microsoft describes as limited usage per requesting application.

How to export, step by step

Route 1 of 2

Microsoft Purview eDiscovery export

Members of the eDiscovery Manager role group with an E3 or E5 license

  1. 01Go to the Microsoft Purview portal and sign in with an account that has eDiscovery permissions.
  2. 02Select the eDiscovery solution card, then select Cases.
  3. 03Select a case, open the Searches tab and select the search that covers the Teams mailboxes and sites you need.
  4. 04Select Export in the search and enter an export name.
  5. 05Choose which items to include: indexed items, partially indexed items, or both.
  6. 06Under Messages and related items from mailboxes and Exchange Online, select Organize conversation into HTML transcript and Include Teams and Viva Engage conversations if you want threaded context.
  7. 07Under Export type, choose Export items with items report.
  8. 08Under Export format, choose Create PSTs for messages or Create .msg files for messages, then set the package sizes.
  9. 09Select Export, then OK in the confirmation dialog.
  10. 10Open Process manager, select the Export process and use Download packages once it completes.

The search has to target the right locations. Microsoft stores 1:1 and group chat messages in the mailboxes of the participants, standard channel messages in the mailbox of the team, and shared channel messages in a system mailbox that you reach by searching the parent team's mailbox. For private channels, Microsoft's page describes both member mailboxes and a dedicated private channel mailbox, so include the channel members and confirm coverage in the Locations report.

Route 2 of 2

Teams Export APIs in Microsoft Graph

A registered app with admin-approved application permissions

  1. 01Register an app with the Microsoft identity platform so it can acquire an access token.
  2. 02Have an administrator approve the application permissions Chat.Read.All, ChannelMessage.Read.All and User.Read.All.
  3. 03Call GET https://graph.microsoft.com/v1.0/users/{id}/chats/getAllMessages for each user to export 1:1, group and meeting chats.
  4. 04Call GET https://graph.microsoft.com/v1.0/teams/{id}/channels/getAllMessages for each team to export channel messages.
  5. 05Add a $filter on lastModifiedDateTime to limit the date range and a $top value, which Microsoft recommends setting no higher than 250.
  6. 06Request the URL in @odata.nextLink repeatedly until the response no longer includes one.

The user endpoint returns both sent and received messages, so calling it for every person in a chat produces duplicates. Microsoft documents a filter on from/user/id to return only messages sent by a given user. Meeting transcripts and recordings need OnlineMeetingTranscript.Read.All and OnlineMeetingRecording.Read.All.

What comes out

From Purview, Teams messages arrive as mailbox items. In a PST, Microsoft says conversations sit in the Team Chat folder under Conversation History, and the title of each channel message contains the team name and channel name. If you select the HTML transcript option, individual chat messages are consolidated into threaded transcript files instead of one item per message. Files shared in Teams are exported as native documents from SharePoint and OneDrive.

Every export also has a downloadable report package of CSV files: a Summary with the query, start and end time and item totals, a Settings file recording the options used, a Locations file listing each mailbox and site with its item count, and an Items file with one row per exported item.

The Export APIs return chatMessage objects as JSON. Each has an id, a replyToId that links a reply to its root message, the sender, created and last modified timestamps, the body, attachments and mentions. Transcript content is VTT by default, with DOCX on request, and recordings are MP4.

In the exportWhat it contains
PST or .msg filesChat and channel messages as mailbox items. With location grouping selected, each mailbox becomes its own PST named after the mailbox.
HTML transcriptsTeams conversations threaded into one transcript file, when Organize conversation into HTML transcript is selected.
SharePoint and OneDrive filesFiles shared in channels and chats, and meeting recordings, exported as native documents.
Items CSV reportOne row per item with its data source, compound path, subject or title, date and success or error status.
Locations CSV reportEach mailbox or site in scope, with location subtype, item count, size in bytes and status.
Summary and Settings CSV reportsThe query, who ran it and when, item totals, and the exact export options used.
chatMessage JSON (Export APIs)Message id, replyToId, sender identity, timestamps, body, attachments and mentions.

Before you rely on it

Limits and gotchas.

  • Search export packages expire 14 days after the export is created and cannot be recovered after that.
  • An export that runs for more than seven days without completing is canceled automatically, so Microsoft advises splitting large exports by date range.
  • Including Teams conversations adds messages posted within a 12-hour window before and after each matching item, so the export can contain messages outside your date range.
  • Not all Teams content is discoverable. Reactions from before June 1, 2022 are not available, and anonymous users who joined meetings and calls are not supported in search queries.
  • Through the Export APIs, messages a user deleted are only retrievable for 21 days, and messages from deleted teams, channels and users for 30 days, unless a retention policy or hold applies.
  • The Export APIs do not guarantee message order by any date field, and meeting-related control messages are not supported.
  • In a meeting that includes guests, only admins in the organization that hosts the meeting can search its chat messages.

Handle with care

Personal data inside a Microsoft Teams export.

  • Sender display names and user IDs on every message
  • Chat and channel message text, including private 1:1 and group chats
  • Mentions of named colleagues inside message bodies
  • Meeting metadata such as join and leave events for each participant
  • Meeting recordings and transcripts, which carry voices and spoken names
  • Guest and external participants' messages in chats and meetings
  • Mailbox addresses and site URLs in the Items and Locations reports

An export is a copy outside the access controls of Microsoft Teams. Store it encrypted, limit who can open it and delete working copies when you are done. The personal data scrubber removes common identifiers in your browser before a file is shared.

What the export can be worth

Outrich Data is a direct buyer of de-identified company data for AI training, from companies with 50 or more employees. We never connect to your Microsoft Teams account: your team runs the export above and removes what is out of scope. Not every export qualifies, and a rights review comes before any offer.

Questions

Exporting from Microsoft Teams: common questions.

Can an admin export Teams chat history?
Yes. A member of the eDiscovery Manager role group can run a search in a Microsoft Purview eDiscovery case over the relevant user mailboxes and export the results as PST files, .msg files or HTML transcripts. Chats can also be pulled as JSON with the Teams Export APIs.
Where are Teams messages stored for export?
Microsoft keeps compliance copies in Exchange Online. Messages from 1:1 and group chats are in the mailboxes of the participants, and standard channel messages are in the mailbox associated with the team. Files are in SharePoint for channels and in the sharer's OneDrive for chats.
Does a Teams export include meeting recordings?
It can. Recordings are stored in the OneDrive account of the person who recorded the meeting, so that OneDrive has to be in the search. Microsoft notes a 350 MB limit on the recorded .mp4 file for processing. Through the Export APIs, recordings are returned as MP4 and transcripts as VTT.
How long do I have to download a Teams export?
Search exports in Microsoft Purview can be downloaded for 14 days from the time the export was created. After that the packages are deleted and the export has to be run again.

Steps were checked against Microsoft Teams documentation on 2026-11-17. Vendors change menus, plans and limits, so confirm against the linked pages. Microsoft Teams is a trademark of its owner. Outrich Data is not affiliated with Microsoft Teams.

Find out if your data qualifies.

Eleven questions, about five minutes, no call required. You get an answer on screen and a written follow-up.

esc