Teams recording setup (Manual)

Updated 16 Nov 202610 min read

Step-by-step PowerShell commands for complete control over the deployment process. Best for: - Custom configurations - Complex environments - Advanced administrators

Manual setup process overview#

This guide is the manual alternative to the automated setup script. It walks through each step individually in PowerShell and is useful if the automated script encounters issues in your environment, if your organisation's security policies prevent running remote scripts, or if you simply prefer to run each command yourself.

Although this is a manual process, you can use the Configuration values form below to make things easier. Select your environment and fill in each value as you progress through the steps — all PowerShell commands on this page will update automatically with your real IDs so you can copy and paste them directly.

Your valuesFill these in and the commands on this page use them. They stay in this browser tab.

Getting Started#

Setting up Teams recording with Focus is straightforward and can be configured to match your organization's specific recording policies. Whether you need compliant recording for regulatory purposes or convenience recording for business optimization, our solution adapts to your requirements.

Focus uses a dual-bot recording architecture. Two recording bots work together as a paired set to provide reliable and resilient recording of your Teams calls and meetings.

Requirements#

To setup the required policy option you will need the below:

  • An Azure global admin user account or Teams global admin user account

  • A Focus Super user account

  • The following IDs provided by the Subphonic support team:

    • Recording Bot 1 Application ID (referred to as XXXX-XXXX-RECORDING-BOT-1-ID in this guide)

    • Recording Bot 2 Application ID (referred to as XXXX-XXXX-RECORDING-BOT-2-ID in this guide)

    • Entra Sync Application ID (referred to as XXXX-XXXX-ENTRA-SYNC-ID in this guide)

Manual - First setup#

Bot enablement#

The first time you enable teams recording (of any type) your azure admin user will need to allow the Focus portal and recording bots to connect to your Microsoft instance. You need to grant admin consent for both recording bots.

  1. Your support team will provide you with Admin Consent URLs for both recording bots. Open the Bot 1 consent link in a browser that is logged into the correct tenant you wish to connect to Focus for recording.

    The URL will be in the format:

    text
    https://login.microsoftonline.com/common/adminconsent?client_id=XXXX-XXXX-RECORDING-BOT-1-ID&state=1&redirect_uri=https://www.aiphoria.net/focus/teams-setup-complete
  2. If you have multiple Microsoft accounts, select the correct Microsoft global administrator account or login as normal.

  3. Accept the permissions required to allow the Focus bot to subscribe to your tenant.

  1. Once successful you will be redirected to a success page. Now repeat the consent for Bot 2 using the second URL:

    text
    https://login.microsoftonline.com/common/adminconsent?client_id=XXXX-XXXX-RECORDING-BOT-2-ID&state=1&redirect_uri=https://www.aiphoria.net/focus/teams-setup-complete
  2. Accept the permissions again. Once both consents are complete, continue with the Entra Sync consent below.


Focus uses an Entra Sync application to synchronise users from your Azure AD / Entra ID. You need to grant admin consent for this application in addition to the recording bots above.

  1. Your support team will provide you with an Entra Sync consent URL. Open this link in the same browser session.

    The URL will be in the format:

    text
    https://login.microsoftonline.com/common/adminconsent?client_id=XXXX-XXXX-ENTRA-SYNC-ID&state=12345&redirect_uri=https://www.aiphoria.net/focus/focus-entra-sync-complete
  2. Accept the permissions as before.


PowerShell configuration steps#

PowerShell setup#

The following steps must be carried out in PowerShell.

  1. Open PowerShell as an administrator.

  1. Run the below command to allow remote scripts to run (this only changes your current PowerShell session)

powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
  1. Install the Microsoft Teams PowerShell module (you only need to install the module the first time it is run)

powershell
Install-Module MicrosoftTeams -Force -Scope CurrentUser -AllowClobber
  1. Install the Microsoft Graph PowerShell modules (required for creating the security group later)

powershell
Install-Module Microsoft.Graph.Authentication -Force -Scope CurrentUser -AllowClobber
Install-Module Microsoft.Graph.Groups -Force -Scope CurrentUser -AllowClobber
Install-Module Microsoft.Graph.Identity.DirectoryManagement -Force -Scope CurrentUser -AllowClobber
  1. Import the modules into your session

powershell
Import-Module MicrosoftTeams -Force
Import-Module Microsoft.Graph.Authentication -Force
Import-Module Microsoft.Graph.Groups -Force
Import-Module Microsoft.Graph.Identity.DirectoryManagement -Force
  1. Connect your PowerShell window to Microsoft Teams. Once run you should be prompted to login to the correct Microsoft account

powershell
Connect-MicrosoftTeams
  1. Connect to Microsoft Graph (required for group management)

powershell
Connect-MgGraph -Scopes "Group.ReadWrite.All","Organization.Read.All" -NoWelcome

Create the application instances (recording bots)#

Once everything is installed and PowerShell is connected to Teams and Graph, it is time to create the recording bots. Focus requires two bot application instances that work together as a paired set.

Create Bot 1:

  1. Run the below command, replacing the placeholder values with your own:

  • UserPrincipalName: This is the recording bot's "name". It needs to be an email address with the same domain as your Microsoft Teams instance. We recommend using your "onmicrosoft" address. Note the _1 suffix to distinguish it from Bot 2.

  • DisplayName: This is the name for the recording bot. It doesn't show to any users so can be anything you wish.

    • In this example we will use: FocusRecordingBot_1

  • ApplicationId: The Recording Bot 1 Application ID provided by the Subphonic support team.

powershell
New-CsOnlineApplicationInstance -UserPrincipalName focusrecordingbot_1@YOURDOMAIN.onmicrosoft.com -DisplayName FocusRecordingBot_1 -ApplicationId XXXX-XXXX-RECORDING-BOT-1-ID
  1. Once the command has completed, the application instance details will be displayed:

  • RunspaceId : rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr

  • ObjectId : oooooooo-oooo-oooo-oooo-oooooooooooo

  • TenantId : tttttttt-tttt-tttt-tttt-tttttttttttt

  • UserPrincipalName : focusrecordingbot_1@yourdomain.onmicrosoft.com

  • ApplicationId : your-bot-1-app-id

  • DisplayName : FocusRecordingBot_1

  1. Stamp the ApplicationId on the bot instance:

powershell
Set-CsOnlineApplicationInstance -Identity BOT-1-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-1-ID
  1. Sync Bot 1:

powershell
Sync-CsOnlineApplicationInstance -ObjectId BOT-1-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-1-ID

Create Bot 2:

  1. Now create the second bot instance, using the Bot 2 Application ID and a _2 suffix:

powershell
New-CsOnlineApplicationInstance -UserPrincipalName focusrecordingbot_2@YOURDOMAIN.onmicrosoft.com -DisplayName FocusRecordingBot_2 -ApplicationId XXXX-XXXX-RECORDING-BOT-2-ID
  1. Stamp the ApplicationId on Bot 2:

powershell
Set-CsOnlineApplicationInstance -Identity BOT-2-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-2-ID
  1. Sync Bot 2:

powershell
Sync-CsOnlineApplicationInstance -ObjectId BOT-2-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-2-ID

Create the compliance recording policy#
  1. Create the recording policy. You need to pass the following values:

  • Description: A simple description for the policy.

    • Format: YourCompany Compliance Recording Policy

  • Tag: A single string identifier for the policy. Note: this is passed as the last positional parameter.

    • Format: YourCompanyComplianceRecordingPolicy

powershell
New-CsTeamsComplianceRecordingPolicy -Enabled $true -Description "YourCompany Compliance Recording Policy" YourCompanyComplianceRecordingPolicy

Once this command has completed, the policy details should be displayed:

  • Identity : Tag

  • ComplianceRecordingApplications : {}

  • Enabled : True

  • WarnUserOnRemoval : True

  • Description : YourCompany Compliance Recording Policy


  1. Link Bot 1 to the policy. Only Bot 1 is linked directly — Bot 2 will be paired onto Bot 1 in the next step.

  • Id: The ObjectId of Bot 1 (BOT-1-OBJECT-ID).

  • Parent: The policy tag from step 8.

powershell
New-CsTeamsComplianceRecordingApplication -Parent "YourCompanyComplianceRecordingPolicy" -Id "BOT-1-OBJECT-ID"

Pair Bot 2 with Bot 1#
  1. Now pair Bot 2 as a ComplianceRecordingPairedApplication on Bot 1. This links the two bots together so they work as a set.

First, create the paired application object using Bot 2's ObjectId:

powershell
$pairedApp = New-CsTeamsComplianceRecordingPairedApplication -Id "BOT-2-OBJECT-ID"

Then set it on Bot 1's compliance recording application entry. The Identity is in the format Tag:PolicyName/Bot1ObjectId:

powershell
Set-CsTeamsComplianceRecordingApplication -Identity "Tag:YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID" -ComplianceRecordingPairedApplications @($pairedApp)
  1. Confirm both bots are linked correctly:

powershell
Get-CsTeamsComplianceRecordingApplication

You should see Bot 1 listed with Bot 2 shown under ComplianceRecordingPairedApplications.


Set compliance or convenience recording options#

As detailed under the recording options, for some compliance use cases companies are not permitted to make calls unless they are being recorded. This is the Microsoft default setting and it will prevent any calls if there is a loss of connection between a user and the recorder. If you wish to change this policy to use convenience recording follow the instructions below. If compliant recording is what you need, you can skip this section.

  1. The convenience flags are set on Bot 1's compliance recording application entry. The Identity is the same format used in the pairing step above:

  • Identity: Tag:PolicyName/Bot1ObjectId

    • Format: YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID

  • There are 4 options you can set:

    • RequiredBeforeCallEstablishment — set to $false to allow PSTN calls if the Bot is not reachable.

    • RequiredBeforeMeetingJoin — set to $false to allow meetings to be joined if the Bot is not reachable.

    • RequiredDuringCall — set to $false to allow calls to continue if the Bot drops during a call.

    • RequiredDuringMeeting — set to $false to allow meetings to continue if the Bot drops during a meeting.

You can set multiple options on the same line. The below example sets all 4, which is recommended for convenience recording:

powershell
Set-CsTeamsComplianceRecordingApplication -Identity YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID -RequiredBeforeCallEstablishment $false -RequiredBeforeMeetingJoin $false -RequiredDuringCall $false -RequiredDuringMeeting $false
  1. Verify the changes were saved:

powershell
Get-CsTeamsComplianceRecordingApplication

Create the security group for recorded users#

You need a security group in Entra ID (Azure AD) to control which users are recorded. Focus will sync and record any users placed in this group.

  1. Create the security group using Microsoft Graph PowerShell. Replace the group name with whatever your onboarding team has specified (we use Focus Recorded Users in this example):

powershell
New-MgGroup -DisplayName "Focus Recorded Users" -Description "Users recorded by Focus" -MailEnabled:$false -MailNickname "FocusRecordedUsers" -SecurityEnabled:$true

Once created, the group details will be displayed. Make a note of the Id — this is the Group ID needed for the next step.


Assign the policy to the group#

Users can be assigned on a per-user basis, however it is recommended to use the group approach described below so that any users added to the group are automatically assigned the policy.

  1. Run the following command, replacing the values with your own:

  • GroupId: The Group Id from step 14. Enter it in the configuration panel at the top of the page.

  • PolicyType: Always TeamsComplianceRecordingPolicy

  • PolicyName: The policy tag created in step 8.

    • Format: YourCompanyComplianceRecordingPolicy

  • Rank: Always 1

powershell
New-CsGroupPolicyAssignment -GroupId YOUR-GROUP-ID -PolicyType TeamsComplianceRecordingPolicy -PolicyName YourCompanyComplianceRecordingPolicy -Rank 1

Verify the setup#
  1. Check the policy is assigned to the group:

powershell
Get-CsGroupPolicyAssignment -PolicyType TeamsComplianceRecordingPolicy
  1. Check a specific user has the correct policy assigned (replace with a real user email from your group):

powershell
Get-CsUserPolicyAssignment -Identity useremail@companydomain.com -PolicyType TeamsComplianceRecordingPolicy
  1. Review the full policy details:

powershell
Get-CsTeamsComplianceRecordingPolicy
  1. Check both bots are correctly linked and paired:

powershell
Get-CsTeamsComplianceRecordingApplication

You should see Bot 1 listed as the main compliance recording application with Bot 2 under ComplianceRecordingPairedApplications.


Check for conflicting existing policy assignments#

Before adding users to the recorded users group, it's worth checking whether they already have a different Teams compliance recording policy assigned — either directly, or through membership of another group. A direct assignment always overrides a group assignment, so simply adding a user to the Focus recorded users group will not apply the Focus policy to them until that direct assignment is cleared. A group-sourced assignment is simpler to resolve — removing the user from that other group is normally enough.

  1. List every user in the tenant who already has a non-default (non-"Global") compliance recording policy assigned:

powershell
Get-CsOnlineUser -ResultSize 100000 | Where-Object { $_.TeamsComplianceRecordingPolicy -and $_.TeamsComplianceRecordingPolicy -ne "Global" } | Select-Object DisplayName, UserPrincipalName, TeamsComplianceRecordingPolicy | Format-Table -AutoSize
  1. For any user returned above, check whether their assignment is coming from a direct grant or a group (replace with their real email):

powershell
(Get-CsUserPolicyAssignment -Identity useremail@companydomain.com -PolicyType TeamsComplianceRecordingPolicy).PolicySource | Select-Object AssignmentType, PolicyName, Reference | Format-Table -AutoSize

AssignmentType will show as either Direct or Group for each source found — Reference shows the group name where relevant.

  1. If the assignment is a direct grant, clear it so the user can inherit the Focus policy through group membership instead (replace with their real email):

powershell
Grant-CsTeamsComplianceRecordingPolicy -Identity useremail@companydomain.com -PolicyName $null

Removing Teams recording#

If you need to remove the Teams recording configuration from your tenant, see the manual removal guide.

Was this page helpful?