Step by Step: fetching Microsoft Teams conversation history (chat history)

Scenario A: Targeting an specific Team

An uncommon but definitely one of those once in a while query from the HR or compliance/security leadership you will get is “Can we search for Microsoft Teams chat” in Office 365.

clip_image001

The answer depends on the type of content/period that you need. Here are some of the use cases I worked on (probably not the exact case as yours but you might get some clarity here about where to look for)

Teams stores an individual’s chat history in a hidden file in the users mailbox which is not accessible via OWA or Outlook. Users or Administrators cannot access these hidden files. Skype for Business used to archive these in the users mailbox which they could delete but we didn’t worry about that because our email archive still had a record of those IMs.

You can see in the following screenshot that I have tried to add the Internal IT channel mailbox in to the Outlook and obviously “Conversation History” is empty because it’s a hidden folder. So, with that in mind, we will have to dig in through a different way.

clip_image002

clip_image003

clip_image004

Scenario A: How to retrieve the conversation history of a particular Team/Channel?

First lets connect to Exchange online PowerShell to put up a foundation in to what we are looking for.

Connect-EXOPSSession

Login as a Global Admin

clip_image005

All the chat history from Microsoft Teams is saved into a mailbox with the name of the Team. So I’m looking for a mailbox called “Internal IT”. Easiest way is to fire up trusty PowerShell and run:

Let’s run this line to retrieve all the group mailboxes we have in this tenant.

get-mailbox -groupmailbox

I see all the shared mailboxes in my tenant. As you can see I find one called “Internal IT” as shown below.

clip_image006

Now this is the Channel I am interested in (Internal IT). This simply means that each channel has a dedicated database which brings the initial satisfaction ! We could surely get something out now.

clip_image007

With that in mind, we now know what is the address of the Team channel I need to look in to. And, here comes the e-Discovery content search for the rescue. Yes we can fetch the Teams chat history from there !

Head on to Compliance Admin blade from office 365 Admin center

clip_image008

Go to “e-Discovery”

clip_image009

Start by creating a new case here. Hit “+ Create a case” to begin

clip_image010

Give it a simple name and a description and save

clip_image011

Click on the blue “Open” button to get inside the case

clip_image012

It brings you to the search interface

clip_image013

From Searches, add the following search parameters.

clip_image014

You can customize your query to suite your needs and I have done it as below. Feel free to click that little “X” to close each parameter and add another to match your target result.

clip_image015

Use the “Add Conditions” button to refine your search criteria

clip_image001[6]

clip_image002[7]

I am not going to search based on a keyword so it’s going to be the participants parameter and the value is my target Team (Project Delivery)

clip_image016

From the locations, choose the following and unselect everything else.

clip_image017

You can further customize your search query to get a more refined search result but it’s totally up to you. My target is to get the entire chat history of “Project Delivery Team” Team chat.

Finally hit the search button and give it a few seconds/minutes (based on the content size of the tenant).

clip_image001

And, here we are ! It now shows me all the IM’s under this Team.

clip_image018

You can export the result in two ways, a report or the result

clip_image019

Also, it allows you to choose what you want to export.

clip_image020

clip_image021

Once done, click on the relevant export batch and download it.

clip_image022

When you download, there’ll be a small tool to obtain the batch. Make sure you are on the Microsoft Edge browser for this final task.

clip_image023

Warning: You must use Microsoft Edge or Internet Explorer to download search results or reports. Please switch to one of these browsers to download the content.

The following error means you are not using Microsoft Edge for this task. Just switch your browser and you should be good to go !

clip_image024

7 thoughts on “Step by Step: fetching Microsoft Teams conversation history (chat history)

  1. Pingback: How do you save a team conversation history in Outlook? - Bike And Motorcycle

  2. Pingback: How to export Microsoft Teams chats | The Cloud Hub

  3. Pingback: How to export Teams chats | The Cloud Hub

  4. sukarechhe

    I have a 2 of members who’s chat history not being save for each others and everytime they need to find each side by new connect if want to chat. Call function also not being appeared.

  5. Mike Cairns

    Hi Manoj. Thanks for posting. But some things are really unclear. Are you trying to find the posts (you call them chat) in a single channel called “Internal IT”? You seem to be retrieving all emails and chat from the entire group mailbox called “Project Delivery”, not from the channel.

Leave a comment