You can migrate Private Chats from Microsoft Teams to Mail. Individual messages will be migrated (and displayed) as an email, with conversations stored in folders (named using the names of the users involved in the Private Chat).
Multi Factor Authentication must be disabled for the specified admin accounts when migrating Microsoft Teams.
Via Microsoft Graph API
Enable "getallmessages" API
To allow migration, you will need to enable the "getallmessages" API.
It is a protected API and also requires specific Microsoft billing and licensing requirements so you (as the customer) will need to request enablement directly from Microsoft. To do so:
- Navigate to the list of protected APIs for Microsoft Teams and request access to the APIs using the Request Form within the article. You will be required to fill out the form and submit.
- Next, you will need to set Licensing and payment requirements for Microsoft Teams APIs in Microsoft Graph. Select Model A or Model B, as required.
Migrate a user's Private Chats
As part of a Microsoft 365 to Microsoft 365 migration
- On the Source Platform screen, select Advanced Settings > Office 365 Groups > Teams Chat API Licensing Model and use the drop down menu to choose either Model A or Model B (dependent on the Model set as part of the API enablement process).
- On the User screen, add the user that you want to migrate from (Source) in the Export Name and the user that you want to migrate to (Destination) in the Import Name, and ensure that the Conversations checkbox is checked.
- On the Config Settings screen, select Advanced Settings > Email > Private Chat Top Level Folder and enter a name for the folder that all the user's Private Chats will be displayed in within Outlook.
Via EWS API
As an alternative to the billable Microsoft Graph API, you can migrate Microsoft Teams Private Messages using the free EWS API, as follows:
- On the Source Platform screen, select Advanced Settings > Microsoft Teams/Groups > Enable EWS API for Teams Private Chats.
- On the Items to Migrate screen, add the user that you want to migrate from (Source) in the Export Name and the user that you want to migrate (Destination) in the Import Name, and ensure that the Conversations checkbox is checked.
- Private Chats are imported as emails into the Destination – Each chat will become an email with a specific label “Private Chats”. Label name will either contain a list of names of all chat participants or the actual chat name (if it was renamed in Source).
- In case we can’t resolve the Chat Name, it will be defaulted to (“UNKNOWN_CONVERSATION”).
- The emails generated will include: -
- “From” field corresponding to the message author email (domain replaced if enabled).
- “To” field contains chat member emails (also domain replaced if enabled).
- Email subject contains chat name (or list of chat member names) and the date private chat was created on.
- If Domain Replacements are required for the migration, this must be enabled by navigating to Config Settings > Advanced Settings > Domain Replacements > Enable “Email”.
- If Domain Replacements are enabled, we will replace user emails using the specified csv file added to Config Settings > “Address replacements”.
- To migrate file attachments:
- Make sure the Drive checkbox is checked for all required items on the Items to Migrate screen.
- The Config Settings > Advanced Settings > Reporting > Record Document Mapping setting must be enabled.
Please note, Private Chats cannot be removed, only hidden. Hidden chats will still be exported since we are unable to distinguish between deleted and actual conversations.