Mark Oliver's World

Microsoft Teams Compliance Recording

20/03/2022

This is the first post in a series on Microsoft Teams Compliance Recording .

Microsoft teams has the capability to record all of its calls, both the audio and video.

Anyone can do it by using the record button when in a call, however there is also the capability to record all calls all the time. This is normally used in a business capacity and is generally called Compliance Recording.

Compliance recording is normally needed for companies like Financial Institutions that need to ensure that all communication with a customer is available for auditing. This includes phone calls and video calls.

Compliance Recording through MSTeams however is a complicated process.

Communication between Microsoft Teams and the Recorder Bot is achieved through an Azure "Bot Service Channel". The Microsoft Teams cloud service connects to one side of the channel, and the recorder bot connects to the other side. This allows the recorder bot to receive audio and metadata for calls made by Microsoft Teams users.

The Bot service channel needs to be given the required permissions, and configured with a way to authorise the bot for the recording Teams Tenant.

The Bot service channel needs to be given permissions in the Teams Tenant that is to be recorded.

The Teams Tenant will then need to Enable Policy Recording for the Bot service channel.

The users within the Teams Tenant will need to have the Recording Policy enabled. This can be all users, or a selection.

Most of this is documented on Microsoft Docs: https://learn.microsoft.com/en-us/microsoftteams/teams-recording-policy

So that is the easy bit done, now for the hard bit. The recording software.

Firstly, a warning, To be compliant with Microsoft licensing this must be hosted in Azure on a VM of some kind: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/requirements-considerations-application-hosted-media-bots#c-or-net-and-windows-server-for-development

To build this software, Microsoft have provided some helpful SDKs:

  • Microsoft.Graph.Communications.Calls.Media - This allows you to talk with Ms Graph API which is where all the communication with Teams occurs for the Calls to be recorded.
  • Microsoft.Skype.Bots.Media - This is the media sdk, it allows the audio and video passed from teams to be decoded into readable and usable data, Namely PCM audio data and H264 video data (there are other choices).

Note - These SDKs at time of writing only support the .NET Framework.

Note - Some of these SDKs are "preview" only, which means they are not officially available or supported.

There are also examples of how to integrate these SDKs into your code, dependant on the recording concepts you require:
https://github.com/microsoftgraph/microsoft-graph-comms-samples

Be aware, these are purely available to show the general idea on how to code a compliance recorder. There are MANY challenges to overcome, that these examples do not deal with.

I will blog more on this subject, it is an in depth one. Of course, there are companies out there that will do most of this work for you: https://cloudpartners.transform.microsoft.com/compliance-recording-solutions


Thank you for your time.

If you want to reach out, catch me on Twitter!