Teams recording setup (Manual)
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.
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-IDin this guide)Recording Bot 2 Application ID (referred to as
XXXX-XXXX-RECORDING-BOT-2-IDin this guide)Entra Sync Application ID (referred to as
XXXX-XXXX-ENTRA-SYNC-IDin 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.
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:
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-completeIf you have multiple Microsoft accounts, select the correct Microsoft global administrator account or login as normal.
Accept the permissions required to allow the Focus bot to subscribe to your tenant.
Once successful you will be redirected to a success page. Now repeat the consent for Bot 2 using the second URL:
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-completeAccept the permissions again. Once both consents are complete, continue with the Entra Sync consent below.
Entra Sync consent#
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.
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:
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-completeAccept the permissions as before.
PowerShell configuration steps#
PowerShell setup#
The following steps must be carried out in PowerShell.
Open PowerShell as an administrator.
Run the below command to allow remote scripts to run (this only changes your current PowerShell session)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope ProcessInstall the Microsoft Teams PowerShell module (you only need to install the module the first time it is run)
Install-Module MicrosoftTeams -Force -Scope CurrentUser -AllowClobberInstall the Microsoft Graph PowerShell modules (required for creating the security group later)
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 -AllowClobberImport the modules into your session
Import-Module MicrosoftTeams -Force
Import-Module Microsoft.Graph.Authentication -Force
Import-Module Microsoft.Graph.Groups -Force
Import-Module Microsoft.Graph.Identity.DirectoryManagement -ForceConnect your PowerShell window to Microsoft Teams. Once run you should be prompted to login to the correct Microsoft account
Connect-MicrosoftTeamsConnect to Microsoft Graph (required for group management)
Connect-MgGraph -Scopes "Group.ReadWrite.All","Organization.Read.All" -NoWelcomeCreate 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:
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
_1suffix 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.
New-CsOnlineApplicationInstance -UserPrincipalName focusrecordingbot_1@YOURDOMAIN.onmicrosoft.com -DisplayName FocusRecordingBot_1 -ApplicationId XXXX-XXXX-RECORDING-BOT-1-IDOnce 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
Stamp the ApplicationId on the bot instance:
Set-CsOnlineApplicationInstance -Identity BOT-1-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-1-IDSync Bot 1:
Sync-CsOnlineApplicationInstance -ObjectId BOT-1-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-1-IDCreate Bot 2:
Now create the second bot instance, using the Bot 2 Application ID and a
_2suffix:
New-CsOnlineApplicationInstance -UserPrincipalName focusrecordingbot_2@YOURDOMAIN.onmicrosoft.com -DisplayName FocusRecordingBot_2 -ApplicationId XXXX-XXXX-RECORDING-BOT-2-IDStamp the ApplicationId on Bot 2:
Set-CsOnlineApplicationInstance -Identity BOT-2-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-2-IDSync Bot 2:
Sync-CsOnlineApplicationInstance -ObjectId BOT-2-OBJECT-ID -ApplicationId XXXX-XXXX-RECORDING-BOT-2-IDCreate the compliance recording policy#
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
New-CsTeamsComplianceRecordingPolicy -Enabled $true -Description "YourCompany Compliance Recording Policy" YourCompanyComplianceRecordingPolicyOnce this command has completed, the policy details should be displayed:
Identity : Tag
ComplianceRecordingApplications : {}
Enabled : True
WarnUserOnRemoval : True
Description : YourCompany Compliance Recording Policy
Link Bot 1 to the policy#
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.
New-CsTeamsComplianceRecordingApplication -Parent "YourCompanyComplianceRecordingPolicy" -Id "BOT-1-OBJECT-ID"Pair Bot 2 with Bot 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:
$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:
Set-CsTeamsComplianceRecordingApplication -Identity "Tag:YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID" -ComplianceRecordingPairedApplications @($pairedApp)Confirm both bots are linked correctly:
Get-CsTeamsComplianceRecordingApplicationYou 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.
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/Bot1ObjectIdFormat: YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID
There are 4 options you can set:
RequiredBeforeCallEstablishment — set to
$falseto allow PSTN calls if the Bot is not reachable.RequiredBeforeMeetingJoin — set to
$falseto allow meetings to be joined if the Bot is not reachable.RequiredDuringCall — set to
$falseto allow calls to continue if the Bot drops during a call.RequiredDuringMeeting — set to
$falseto 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:
Set-CsTeamsComplianceRecordingApplication -Identity YourCompanyComplianceRecordingPolicy/BOT-1-OBJECT-ID -RequiredBeforeCallEstablishment $false -RequiredBeforeMeetingJoin $false -RequiredDuringCall $false -RequiredDuringMeeting $falseVerify the changes were saved:
Get-CsTeamsComplianceRecordingApplicationCreate 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.
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):
New-MgGroup -DisplayName "Focus Recorded Users" -Description "Users recorded by Focus" -MailEnabled:$false -MailNickname "FocusRecordedUsers" -SecurityEnabled:$trueOnce 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.
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
New-CsGroupPolicyAssignment -GroupId YOUR-GROUP-ID -PolicyType TeamsComplianceRecordingPolicy -PolicyName YourCompanyComplianceRecordingPolicy -Rank 1Verify the setup#
Check the policy is assigned to the group:
Get-CsGroupPolicyAssignment -PolicyType TeamsComplianceRecordingPolicyCheck a specific user has the correct policy assigned (replace with a real user email from your group):
Get-CsUserPolicyAssignment -Identity useremail@companydomain.com -PolicyType TeamsComplianceRecordingPolicyReview the full policy details:
Get-CsTeamsComplianceRecordingPolicyCheck both bots are correctly linked and paired:
Get-CsTeamsComplianceRecordingApplicationYou 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.
List every user in the tenant who already has a non-default (non-"Global") compliance recording policy assigned:
Get-CsOnlineUser -ResultSize 100000 | Where-Object { $_.TeamsComplianceRecordingPolicy -and $_.TeamsComplianceRecordingPolicy -ne "Global" } | Select-Object DisplayName, UserPrincipalName, TeamsComplianceRecordingPolicy | Format-Table -AutoSizeFor any user returned above, check whether their assignment is coming from a direct grant or a group (replace with their real email):
(Get-CsUserPolicyAssignment -Identity useremail@companydomain.com -PolicyType TeamsComplianceRecordingPolicy).PolicySource | Select-Object AssignmentType, PolicyName, Reference | Format-Table -AutoSizeAssignmentType will show as either Direct or Group for each source found — Reference shows the group name where relevant.
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):
Grant-CsTeamsComplianceRecordingPolicy -Identity useremail@companydomain.com -PolicyName $nullRemoving Teams recording#
If you need to remove the Teams recording configuration from your tenant, see the manual removal guide.