How to export chat text in Microsoft Teams

microsoft-teams

Is there any way to automatically (either with Teams or with third party tools) log a user's Microsoft Teams chats to files on his local system? Much like how it was possible with Sametime, Skype, AOLIM etc.?

Best Answer

A very long and detailed description of the process is found in the article
How to export MS Teams chat to HTML file (for backup).

The article itself is much too long to describe here, and it helpfully contains screenshots for every step of the way. Most of the described steps only need be done once, and the final step that can be repeated is in the form of a PowerShell script.

This process was automated in the Github project of Microsoft Teams chat backup, described as:

This project retrieves a full chat history (messages and uploaded files) and renders it as a HTML.

The project requires node.js version 10 or higher. It was tested on macOS, but will most likely run on Linux and probably on Windows.

Both the article and the Github project require an Auth token (JWT) for calling Microsoft Graph APIs. This token is generated via Microsoft's Graph Explorer website.

Related Question