Administering Compliance Policy for Microsoft Teams Users
In order to complete the steps below, you must have a Teams Service Administrator role.
In the case of Microsoft Teams, the invitation of the Verba Microsoft Teams Bot and the recording is triggered based on the compliance policy assignment of the users.
The registration consists of the following steps:
Accessing the tenant via PowerShell
Separate Azure tenants for the recording provider (bot) and for the Teams environment to record
In the case when the recorded Teams environment and the recording bot are in separate Azure tenants, the following steps have to be done in the Teams tenant.
Follow the steps below to assign a compliance policy to a user:
Step 1 - Download and install the Skype Bus Connector PowerShell module.
Step 2 - Open PowerShell as administrator.
Step 3 - Execute the following command:
Import-Module SkypeOnlineConnector
The next step depends on what kind of authentication method your Teams administrator account uses.
Step 4, If your Teams administrator account uses account name and password for authentication
Step 4a - Execute the following command:
$userCredential = get-Credential
Step 4b - A login prompt will show up. Provide the user credentials.
Step 4c - Execute the following command:
$teamsSession = New-CsOnlineSession -Credential $userCredential -Verbose
Step 4, If your Teams administrator account uses multi-factor authentication
Step 4a - Execute the following command:
$teamsSession = New-CsOnlineSessione
Step 4b - A login prompt will show up. Provide the user credentials.
Step 4c - MFA process starts. Complete the authentication.
Step 5 - Execute the following command:
Import-PSSession $teamsSession
Assigning a Compliance Policy to a user
Step 6 - Execute the following command. Replace the <User’s UPN> part with the recorded user's UPN. Replace the <PolicyName> part with the name of the compliance policy (Whitelisting the App and Creating the Compliance Policy - Step 9)
Grant-CsTeamsComplianceRecordingPolicy -Identity '<User's UPN>' -PolicyName '<PolicyName>'
Once the compliance policy is assigned to the user, it may take some time to take effect. The policy assignment of the user can be checked with the following command. Replace the <User’s UPN> part with the recorded user's UPN.
Get-CsOnlineUser -Identity '<User's UPN>' | Select-Object -ExpandProperty 'TeamsComplianceRecordingPolicy'
Removing the Compliance Policy from a user
Follow the steps below to remove the compliance policy from a user:
Step 6 - Execute the following command. Replace the <User’s UPN> part with the recorded user's UPN. Leave PolicyName empty to remove the policy.
Grant-CsTeamsComplianceRecordingPolicy -Identity '<User's UPN>' -PolicyName ''
It may take some time to take effect. The policy assignment of the user can be checked with the following command. Replace the <User’s UPN> part with the recorded user's UPN.
Get-CsOnlineUser -Identity '<User's UPN>' | Select-Object -ExpandProperty 'TeamsComplianceRecordingPolicy'