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.
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.
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
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.
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.
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
Go to “e-Discovery”
Start by creating a new case here. Hit “+ Create a case” to begin
Give it a simple name and a description and save
Click on the blue “Open” button to get inside the case
It brings you to the search interface
From Searches, add the following search parameters.
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.
Use the “Add Conditions” button to refine your search criteria
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)
From the locations, choose the following and unselect everything else.
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).
And, here we are ! It now shows me all the IM’s under this Team.
You can export the result in two ways, a report or the result
Also, it allows you to choose what you want to export.
Once done, click on the relevant export batch and download it.
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.
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 !