Data Protection Centre/Microsoft 365/How to Export Microsoft Teams Data

Categories

In this article

  • Using eDiscovery in Microsoft Purview
  • Using Microsoft Teams Export API
  • Using PowerShell to export Teams Chat data
  • Using third-party cloud backup solutions

How to Export Microsoft Teams Data

3 Jul 2024
3 min read
Ahana
Microsoft Teams is a collaborative workspace within Microsoft 365 that serves as a central hub for workplace conversations, teamwork, video chats, and document sharing. Due to the widespread adoption of a work-from-home model, there has been a dramatic increase in Teams adoption, making Teams the fastest growing business app in Microsoft’s history. 
This article explores the various options available to export Microsoft Teams data, and its limitations as a backup solution. 
There are four methods you can use to export Teams data: 
  • Export using eDiscovery in Microsoft Purview 

  • Export using Microsoft Teams Export API 

  • Export using PowerShell 

  • Export using third-party backup solutions 

Using eDiscovery in Microsoft Purview

Microsoft eDiscovery lets administrators and eDiscovery managers create cases to collect and preserve necessary data. Users with relevant permissions can run a search to identify content stored in different Microsoft services. Using the eDiscovery search tool available with Core (Standard) and Advanced (Premium) eDiscovery, organizations can search for content across Microsoft 365 data sources and export the search results to a local computer. 

Who can perform the exports using Teams eDiscovery?

To export search results, you must be assigned the Export management role in Microsoft Purview compliance portal. This role is assigned to the built-in eDiscovery Manager role group. 

Required subscriptions: Enterprise plans like Microsoft 365 E3 and E5. 

Step-by-step instructions to export Teams chats using eDiscovery

The eDiscovery Search tool can be used to search for content across Microsoft 365 data sources using keywords and conditions. The results of the search can then be exported to a local computer. 

To know how to create a Core eDiscovery case, read this article. 

  • Step 1: Navigate to Microsoft Purview. Click “Content Searches” under the eDiscovery drop-down on the navigation menu bar on the left-hand side of the screen.  

  • Step 2: Navigate to the “Search” tab. Click “+New Search”. 

  • Step 3: Type a name and description (optional) for the new search. Click “Next”. 

  • Step 4: Add the URL for a Microsoft Team to choose the location to search for content. Click “Next”. 

  •  Step 5: Add conditions for the search if needed. This could include specific keyword(s) and add conditions to search for the keyword. Click “Next”. 

  • Step 6: Review the search and click “Submit”.  

  • Step 7: Once the content search run is complete, administrators can export the search results by clicking on the content search and click on “Actions.” 

  • Step 8: Click on “Export results.” 

  • Step 9: In the right-hand tab that opens, select the output options and the format of content to be exported. Click “Export.” 

Limitations of using eDiscovery export as a backup tool

  • eDiscovery is designed primarily for legal and compliance purposes, not for backup. Setting up eDiscovery requires detailed configuration and understanding of compliance policies. 

  • eDiscovery may not capture all data types or metadata. For example, it may miss certain files, messages, or attachments that are not within the scope of the search parameters. 

  • Needs regular manual exporting, increasing the risk of errors. 

  • Exported data is not easily accessible or usable for recovery. 

  • Not optimized for large-scale backups. 

  • Only available in MS365 Enterprise plans which can be costly and time consuming to set up.  

Using Microsoft Teams Export API

Teams Export API is designed specifically to export Teams chat messages including 1:1, group chat, meeting chat, and channel messages. This method is ideal for organizations that need to perform detailed exports of chat data for compliance, eDiscovery, or other regulatory needs.  

Who can perform the exports?

Exporting Teams data using the Export API requires specific permissions and roles: 
  • Application registration: You must register an application in the Azure portal to obtain the necessary API permissions. 

  • Permissions: The application must have the Teams.Export.All permission, which allows the application to read all messages in a tenant’s Teams and necessary admin consents. 

  • Technical expertise: This method requires the ability to write and execute scripts or applications that can interact with the Export API. Knowledge of OAuth 2.0 authentication, REST APIs, and possibly programming languages like PowerShell, Python, or C# is necessary. 

To know how to set up Export API for your Teams data, read this article by Microsoft. 

Limitations of u using Microsoft Teams Export API

  • The Teams Export API requires significant setup and ongoing management. Requires technical expertise to configure and maintain, making it less user-friendly compared to dedicated backup solutions. 

  • The API may lack granular control over the backup process. Organizations do not have the flexibility to selectively back up or restore specific content types or user data. 

  • Exported data is not easily accessible or usable for recovery. 

  • Not optimized for large-scale backups. 

  • Relying solely on exports may not meet strict regulatory or security requirements for data backup and retention. 

  • The Export API exports data but does not restore it easily. Restoring data back into Teams is complex, time-consuming, and often needs manual effort. 

Using PowerShell to export Teams Chat data

PowerShell is a powerful scripting language that allows administrators to automate various tasks within the Microsoft 365 environment, including exporting Teams chat data. By leveraging PowerShell, you can create scripts to extract chat messages, manage Teams settings, and integrate with other tools for data analysis and reporting. This method is particularly useful for administrators who need to perform regular exports or integrate Teams data with other systems. 

Who can perform the exports?

To export Teams data using PowerShell, you need to have the appropriate administrative permissions and the necessary modules installed: 
  • Admin access: You need to be a Teams Service Admin or Global Admin to access and export Teams data. 

  • The Microsoft Teams and Exchange Online PowerShell modules must be installed and configured on your system. 

Limitations of using PowerShell

  • Requires knowledge of PowerShell scripting and familiarity with APIs and authentication processes. 

  • The initial setup and configuration of modules and permissions can be time-consuming. 

  • Scripts require ongoing maintenance to ensure they function correctly and adapt to changes in the Teams environment or API endpoints. 

  • API calls made through PowerShell scripts are subject to rate limits, which can restrict the volume of data retrieved in a given timeframe. 

Using third-party cloud backup solutions

With third-party cloud backup tools like SysCloud, admins can automate backups, restore from any point-in-time snapshot, and easily export Teams data- channel messages, private messages, and files shared. Additionally, with SysCloud, administrators can easily recover from accidental deletions or ransomware attacks and identify compliance gaps in the backup archives.   

In this article

  • Using eDiscovery in Microsoft Purview
  • Using Microsoft Teams Export API
  • Using PowerShell to export Teams Chat data
  • Using third-party cloud backup solutions