October 1st, 2021

Announcing general availability of Microsoft Graph Export API for Microsoft Teams messages

Exporting Microsoft Teams content with Microsoft Graph Export API

Today, we are thrilled to announce the general availability of Microsoft Graph Export API, that enables customers and ISVs to export Microsoft Teams message data for processing in their Security and Compliance (S+C) SaaS applications.

Organizations need the ability to manage and archive information so that regulatory and legal requirements are met. With the adoption of Microsoft Teams by regulated customers, there is a growing demand by S+C SaaS providers to access Teams messages and message hosted content (files, images, stickers etc.) that are shared in 1:1 or group chat, channel conversations, and Teams meetings. Microsoft Graph Export API for Teams supports exporting Teams messages and message hosted content for a particular user or team that is subject to compliance. Deleted messages are also accessible by the API for up to 21 days after they are deleted.

There are two options for using the API – one is designed for S+C scenarios and the other is designed for more all-purpose scenarios other than S+C. S+C scenarios require an E5 license which provides a seeded capacity to use the API without consumption cost until the seeded capacity is reached. For all other scenarios, there are no specific license requirements, and the API is charged per message exported. For additional details, please see below.

Why Export API?

Some of the critical scenarios powered by Export API are:

  1. Retrieve Teams content

Export API allows applications to export all messages of a specific team for a defined period of time. Teams Message retrieval includes new, updated, and deleted messages and its hosted content. Messages will be exported from all public and/or private channels of the requested team under compliance.

  1. Retrieve content for regulated users

Export API allows applications to export all messages of a specific user for a defined period of time. User Message retrieval includes new, updated, and deleted Messages and its hosted content. Messages will be exported from all 1:1/group chat threads participated for the requested user under compliance

  1. Bulk export of Teams messages

Export APIs support up to 200 RPS per app per tenant and 600 RPS for an application. These limits enable partners to retrieve historical content and be able to bulk export of Teams messages.

  1. Retrieve user deleted messages

Messages that are deleted by users from the Teams client can be accessed using Export APIs up to 21 days from the time of deletion.

For more information, refer to the documentation on Export APIs.

Examples of Export APIs

Here are some examples on how you can use the Export APIs

Example 1: If you have enabled Microsoft Teams in your organization and want to export all the Teams messages to date of a user or a team without any filters, call the API as shown below:

GET https://graph.microsoft.com/v1.0/users/{id}/chats/getAllMessages
GET https://graph.microsoft.com/v1.0/teams/{id}/channels/getAllMessages

Example 2: If you have enabled Microsoft Teams in your organization and want to export all the Teams messages of a user or a team by specifying date time filters and top 50 messages, call the API as shown below:

GET https://graph.microsoft.com/v1.0/users/{id}/chats/getAllMessages?$top=50&$filter=lastModifiedDateTime gt 2020-06-04T18:03:11.591Z and lastModifiedDateTime lt 2020-06-05T21:00:09.413Z
GET https://graph.microsoft.com/v1.0/teams/{id}/channels/getAllMessages?$top=50&$filter=lastModifiedDateTime gt 2020-06-04T18:03:11.591Z and lastModifiedDateTime lt 2020-06-05T21:00:09.413Z

How to access Microsoft Teams Export APIs

Export APIs require application permissions and consent before you can use them. The following permissions are needed:

  • Read.All: enables access to all 1:1, Group chat, and meeting chat messages
  • Read.All: enables access to all channel messages
  • Read.All: enables access to the list of users for a tenant

To request access to Export APIs, complete this request form. Requests made by Wednesday every week, will usually get processed in the same week.

License requirements for Microsoft Graph API for Teams Export and DLP

We are announcing new seeded capacity as an E5 value for S+C applications, and consumption models for the following S+C APIs:

  • Microsoft Graph Change Notifications API for Teams notifications
  • Microsoft Graph Export APIs for Teams messages
  • Microsoft Graph Patch API for Teams messages

Seeded capacity is how much an app can use before having to pay usage fees. Teams S+C APIs include two modes of access, one for S+C applications and one for general usage. Seeded capacity applies to S+C mode only (Model = A). Once the customer exceeds seeded capacity, consumption meters will kick in. The general usage mode will only use consumption meters and will not have any seeded capacity (Model = B). Consumption meter charges for API usage beyond available seeded capacity will be enabled in CY22, and a 30-day notice will be provided before these charges are in effect. Customers can review which apps are accessing their data through the S+C API in the Teams Admin Center. Once meters are in effect, the report will show their usage against their seeded capacity.

Additionally, we will begin enforcing the previously communicated license requirements for these APIs. Existing customers as of October 5th, 2021, will get a six-month grace period to assign users with the proper license. However, all new customers after October 5th, 2021, will be required to have an appropriate E5 license1 to allow access to Teams messages via the Teams S+C APIs.

1Microsoft 365 E5/A5/G5, Microsoft 365 E5 Security, Microsoft 365 E5 Compliance, Microsoft 365 E5 Information Protection and Governance, Microsoft 365 E5 Information Protection & Data Loss Prevention

S+C Scenarios (Model=A)

Restricted to applications performing a security and/or compliance function (A few examples but not limited to: Data loss prevention, eDiscovery, Compliance Archiving etc.). Users must have specific E5 licenses to use this functionality and receive seeded capacity. We are adding seeded capacity per user, calculated per month, and aggregated at the tenant level. For usage beyond the seeded capacity, app owners will be billed for API consumption.

Model A can only access messages from users with an assigned E5 license.

General Usage Scenarios (Model=B)

Available for all non-S+C related scenarios. There are no license requirements and there is no seeded capacity. When consumption meters become available, app owners will be charged for all API calls they make monthly.

A few scenario examples, but not limited to: Teams Backup, Analytics & BI, Sentiment Analysis applications etc.

Evaluation Mode (default)

No model declaration enables access to APIs with limited usage per requesting application for evaluation purposes.

For more information about seeded capacity and consumption fees, please visit Licensing and payment requirements for Microsoft Graph Teams APIs. To learn more about Export API, please visit Export API documentation.

0 comments

Discussion are closed.