Removing MS Teams Recording Prerequisites

How to remove MS Teams recording prerequisites

Overview

This guide explains how to remove the Luware Recording prerequisites from a Microsoft Teams tenant. Follow the steps in this guide to remove the components if you are off-boarding from Luware Recording, or if you need to remove individual components selectively at any time.

These steps are irreversible. Removing these components will immediately disable compliance recording for all affected users. Ensure you have approval before proceeding.

 

The following components are created during the Luware Recording onboarding and this guide will show you how to remove them:

Component Where to Remove Applies To
Group or User Policy Assignment PowerShell All Luware Recording mult-tenant clusters
Teams Compliance Recording Policy PowerShell / Teams Admin Centre All Luware Recording mult-tenant clusters
Recording Bot Application Instance Teams Admin Centre All Luware Recording mult-tenant clusters
Graph API Permissions (Service Principal) Entra ID (Azure AD) All Luware Recording mult-tenant clusters

Prerequisites

Before starting, ensure you have the following:

  • A Global Administrator account for the Microsoft 365 tenant
  • PowerShell 5.1 or later, run as Administrator
  • The Microsoft.Graph and MicrosoftTeams PowerShell modules installed
  • The name of the Compliance Recording Policy created during onboarding (Remove the Group Policy Assignment section below shows how to retrieve this)
  • The name(s) of the Recorded User Group(s) the policy was assigned to

To install the required modules if not already present, run:

Install-Module Microsoft.Graph -Force -AllowClobber

Install-Module MicrosoftTeams -Force -AllowClobber

Then connect to both services before running any removal commands:

Connect-MgGraph -Scopes "Directory.Read.All", "Application.ReadWrite.All" -UseDeviceAuthentication

Connect-MicrosoftTeams

Remove the Policy Assignment

The Microsoft Teams Compliance Recording Policy can be assigned to one or more Entra ID groups, or in some cases directly to users. This assignment must be removed first before the policy itself can be deleted.

Compliance Policy Identification

First you will need to identify the Microsoft Teams Compliance Recording policy that you want to remove so that you can remove the assignment of the policy.

To do this simple run the following command in Powershell

Get-CsTeamsComplianceRecordingPolicy

This will then list out all the compliance recording policies in your tenant. Identify and take not of the policy you want to remove as you will need these details for the later steps.

Compliance Policy Assignment Identification

Group Policy Assignment Identification

Run the following to list all Compliance Recording Policy assignments and identify the group(s) to remove:

Get-CsGroupPolicyAssignment -PolicyType TeamsComplianceRecordingPolicy

Note the GroupId value(s) returned. You will need these in the next step.

User Policy Assignment Identification

If you know specific users that you want to check you can run the following command to identify the policy

Get-CsUserPolicyAssignment -Identity 'user@yourdomain.com' -PolicyType TeamsComplianceRecordingPolicy

To check the policy assignment for all users in your environment you can run the following 

Get-CsOnlineUser | Where-Object { $_.TeamsComplianceRecordingPolicy -eq '<PolicyName>' } |Select-Object UserPrincipalName, TeamsComplianceRecordingPolicy

Compliance Policy Assignment Removal

Group Policy Assignment Removal

For each group the policy is assigned to, run the following — replacing the GroupId with the value noted above:

Remove-CsGroupPolicyAssignment -GroupId "<GroupId>" -PolicyType TeamsComplianceRecordingPolicy

 Policy assignment changes can take up to 24 hours to fully propagate across the tenant. Users may continue to be recorded until this propagation is complete.

 

Verify Removal

Confirm the assignment has been removed by running:

Get-CsGroupPolicyAssignment -PolicyType TeamsComplianceRecordingPolicy

The output should no longer include the group(s) you removed.

User Policy Assignment Removal

For each user you will need to run this command to remove the policy assignment

Grant-CsTeamsComplianceRecordingPolicy -Identity 'user@yourdomain.com' -PolicyName ''

Verify Removal

Confirm the assignment has been removed by running:

Get-CsUserPolicyAssignment -Identity 'user@yourdomain.com'

The output should no longer show a policy assigned to the user.

Remove the Teams Compliance Recording Policy

Once the user/group policy assignment has been removed, the Compliance Recording Policy itself can be deleted.

Option 1: Powershell Method

Run the following, replacing the policy name with the one that was identified earlier in this guide:

Remove-CsTeamsComplianceRecordingPolicy -Identity "<PolicyName>"

To confirm the policy no longer exists:

Get-CsTeamsComplianceRecordingPolicy -Identity "<PolicyName>"

If the policy has been successfully removed, this command will return no results or throw a not-found error.

Option 2: Teams Admin Centre

If you prefer to use the web interface:

  1. Sign in to the Microsoft Teams Admin Centre at https://admin.teams.microsoft.com
  2. In the left-hand navigation, go to Voice > Compliance recording policies.
  3. Locate the Luware Recording compliance policy in the list.
  4. Select the policy by clicking its name, then click Delete.
  5. Confirm the deletion when prompted.

Remove the Recording Bot Application Instance

During onboarding, one (MTCH) or two (MTDE) Luware Recording Bot application instances were created in the tenant. These should be removed from the Teams Admin Centre.

Option1: PowerShell

To find the application instances via PowerShell:

Get-CsOnlineApplicationInstance | Where-Object { $_.DisplayName -like "*LuwareRecordingBot*" }

Note the UserPrincipalName of each instance returned, then remove each one:

Remove-CsOnlineApplicationInstance -Identity "<UserPrincipalName>"

Option 2: Teams Admin Centre

  1. Sign in to the Microsoft Teams Admin Centre at https://admin.teams.microsoft.com
  2. In the left-hand navigation, go to Voice > Resource accounts.
  3. Search for LuwareRecordingBot in the search bar.
  4. Select the account(s) to remove.
  5. Click Delete and confirm when prompted.
  6. For customers not on the Luware Recording Switzerland cluster, repeat for both bot accounts (LuwareRecordingBot1 and LuwareRecordingBot2).

 If the resource account cannot be deleted because it is still assigned to a policy or application, ensure you have removed the policy assignment correctly first by following the sections above, and allow time for changes to propagate before retrying.

 

Remove Graph API Permissions

During onboarding, admin consent was granted to the Luware Recording Bot application, creating a Service Principal in your Azure tenant. This must be removed from Entra ID.

Option 1: PowerShell

For customers on the Luware Recording Switzerland cluster, run:

$app = Get-MgServicePrincipal -Filter "displayName eq 'Luware Stratus Teams Recording'"

Remove-MgServicePrincipal -ServicePrincipalId $app.Id

For customers on any other Luware Recording cluster, run:

$app1 = Get-MgServicePrincipal -Filter "displayName eq 'Luware-CR-MTDE-prod-recbot-01'"

$app2 = Get-MgServicePrincipal -Filter "displayName eq 'Luware-CR-MTDE-prod-recbot-02'"

Remove-MgServicePrincipal -ServicePrincipalId $app1.Id

Remove-MgServicePrincipal -ServicePrincipalId $app2.Id

Via the Entra ID Portal

  1. Sign in to the Microsoft Entra admin centre at https://entra.microsoft.com
  2. In the left-hand navigation, go to Applications > Enterprise applications.
  3. In the search bar, search for the application name listed below for your tenant type.
  4. Select the application from the results.
  5. Click Properties in the left-hand menu, then click Delete at the top of the page.
  6. Confirm the deletion when prompted.

Application names to search for by tenant type:

Tenant Type Application Name to Search For
Switzerland Cluster Bot Luware Stratus Teams Recording
German Cluster Bot 1 Luware-CR-MTDE-prod-recbot-01
German Cluster Bot 2 Luware-CR-MTDE-prod-recbot-02

Final Verification

Once all steps are complete, use the following checklist to confirm everything has been removed successfully.

  • Policy Assignment removed
  • Teams Compliance Recording Policy deleted
  • Luware Recording Bot resource account(s) deleted 
  • Graph API Service Principal(s) removed from Entra ID

⚠  Warning:   

Allow up to 24 hours after completing these steps for all changes to fully propagate across the tenant and recording to cease for all affected users.

 

Support

If you encounter any issues during the removal process, contact Luware support:

Website: https://luware.com
Support portal: https://support.luware.com

ℹ  Note:   

When raising a support case, please have the tenant ID, the compliance policy name, and a description of the issue ready to provide to the support team.

 

 

 

Table of Contents