Below is the requirement to configure auto recording of all the calls – Meetings, p2p Teams calls or PSTN calls.
The core component of the compliance recording solution is the recorder. Recorders are built as scalable Azure-based services (bots) that use Microsoft’s communications platform and register as applications with Microsoft Graph. The recorder provides the direct interaction with the Teams calls and meetings communications platform APIs and provides the endpoint for media ingestion.
To create Recorder Bot, you will need Azure subscription and creating bot there will be charged as per the Azure subscription resource cost.
1. Bot Registration
- Follow the steps in Register Calling Bot. Save the bot name, bot app id and bot secret for configuration.
- Add the following Application Permissions to the bot:
- Calls.AccessMedia.All
- Calls.JoinGroupCall.All
- The permission needs to be consented by tenant admin. Go to “https://login.microsoftonline.com/common/adminconsent?client_id=<app_id>&state=<any_number>&redirect_uri=<any_callback_url>” using tenant admin to sign-in, then consent for the whole tenant.
2. Application Instance creation:
> Import-Module MicrosoftTeams> Connect-MicrosoftTeams> New-CsOnlineApplicationInstance -UserPrincipalName <upn@contoso.com> -DisplayName <displayName> -ApplicationId <your_botappId>> Sync-CsOnlineApplicationInstance -ObjectId <objectId>
3. Create a Compliance Recording Policy
Requires the application instance ID created above. Continue your powershell session and run the following commands.
> New-CsTeamsComplianceRecordingPolicy -Tenant <tenantId> -Enabled $true -Description "Test policy created by <yourName>" <policyIdentity>> Set-CsTeamsComplianceRecordingPolicy -Tenant <tenantId> -Identity <policyIdentity> -ComplianceRecordingApplications ` @(New-CsTeamsComplianceRecordingApplication -Tenant <tenantId> -Parent <policyIdentity> -Id <objectId>)
After 30-60 seconds, the policy should show up. To verify your policy was created correctly:
> Get-CsTeamsComplianceRecordingPolicy <policyIdentity>
4. Assign the Compliance Recording Policy
Requries the policy identity created above. Contine your powershell session and run the following commands.
> Grant-CsTeamsComplianceRecordingPolicy -Identity <userUnderCompliance@contoso.com> -PolicyName <policyIdentity> -Tenant <tenantId>
To verify your policy was assigned correctly:
> Get-CsOnlineUser <userUnderCompliance@contoso.com> | ft sipaddress, tenantid, TeamsComplianceRecordingPolicy