Skip to main content
Skip table of contents

Native Microsoft Teams Integration

Requirements

  • Admin-level access to MS Teams PowerShell

  • Admin-level access to Microsoft Azure CLI.

  • Imagicle specific Main Application ID and Pair Application ID for your Region, to be requested to Imagicle team

Procedure

MS-Teams Tenant Onboarding

First of all, you need to onboard your MS-Teams Tenant, by performing the procedure highlighted in this KB article.

After having onboarded your Tenant, Imagicle team is going to verify collected data and, if everything is correct, initiates the deployment process of the Cloud UCX Suite instance.

In the meantime, you can proceed with the following configurations, to be applied from PowerShell.

Azure App Installation

Please run PowerShell as Administrator on your Windows workstation and login to Azure. If the command fails, make sure you have installed Azure Command Line Interface (CLI) package. You can install it by running this PS command:

POWERSHELL
winget install --exact --id Microsoft.AzureCLI 

If Azure CLI is installed, you can login to Azure by using this command:

POWERSHELL
az login

Alternatively, you can also login without a valid Azure subscription:

POWERSHELL
az login -–allow-no-subscriptions
image-20250408-111940.png

When asked to choose the subscription, just hit enter.

Enter this command:

POWERSHELL
az ad sp create --id $ApplicationId

where $ApplicationId is the MAIN AppID provided by Imagicle.

Now repeat same command, using PAIR AppID:

POWERSHELL
az ad sp create --id $ApplicationIdPair

Admin Consent

MAIN Admin Consent

Now launch a web browser in private “incognito” mode and enter the following web URL:

HTML
https://login.microsoftonline.com/$TenantId/v2.0/adminconsent?client_id=$ApplicationId&scope=https://graph.microsoft.com/.default 
  • $TenantId is the customer’s Microsoft Tenant ID.

  • $ApplicationId is the MAIN AppID provided by Imagicle.

You are prompted to login through the same Global Admin account used for Onboarding.

Once logged in, you get the following window where you are requested to authorize Imagicle to access:

  • Audio streams from an ongoing call

  • Join a Group Call

  • Read all users' profiles

  • Sign in and read user’s profile

image-20250408-072137.png

URL is redirected to Imagicle web site. Please check that new URL includes the statement admin_consent=True, meaning the permissions have been granted. See below:

image-20250408-072015.png

PAIR Admin Consent

Launch again the browser in private “incognito” mode and enter the following web URL:

HTML
https://login.microsoftonline.com/$TenantId/v2.0/adminconsent?client_id=$ApplicationIdPair&scope=https://graph.microsoft.com/.default 
  • $TenantId is the customer’s Microsoft Tenant ID

  • $ApplicationIdPair is the PAIR AppID provided by Imagicle.

You are prompted to login through the same Global Admin account used for Onboarding.

Once logged in, you get the following window where you are requested to authorize Imagicle to access:

  • Audio streams from an ongoing call

  • Join a Group Call

  • Read all users' profiles

  • Sign in and read user’s profile

image-20250408-072434.png

URL is redirected to Imagicle web site. Please check that new URL includes the statement admin_consent=True, meaning the permissions have been granted. See below:

image-20250408-072015.png

Application Instance & Policy Recording

Open PowerShell and connect to Microsoft Teams using the command:

POWERSHELL
Connect-MicrosoftTeams

Configurations for MAIN Imagicle Application

Enter the following PowerShell commands replacing the variables as described below::

POWERSHELL
$AppInstance = New-CsOnlineApplicationInstance -UserPrincipalName $VirtualUser -ApplicationId $ApplicationId -DisplayName $AppName
  • $VirtualUser should be a new unique UPN within your Tenant. As a guideline, Imagicle suggests to enter a username like "imagicle_call_recording@yourdomain.com". You can't use an existing UPN associated to an MS Teams user.

  • $ApplicationId is the MAIN AppID provided by Imagicle.

  • $AppName is a name of your choice, like “ImagicleCallRecording”

New-CsOnlineApplicationInstance command might fail with an error (read here for more details). Please make sure the user is associated to an online MS-Teams Tenant.

Now proceed with next command (no need to replace anything, just copy-paste and run it):

POWERSHELL
Sync-CsOnlineApplicationInstance -ObjectId $AppInstance.ObjectId -ApplicationId $AppInstance.ApplicationId

If the operation results in a “NoContent” error, just ignore it.

Now it is time to create a new Compliance Recording Policy:

POWERSHELL
New-CsTeamsComplianceRecordingPolicy -Identity imagicle_rec -Enable $true
image-20250408-111402.png

Next command creates a Recording Application, coupling recording policy to the Application Instance previously created:

POWERSHELL
New-CsTeamsComplianceRecordingApplication -Identity ("Tag:imagicle_rec/" + $AppInstance.ObjectId) -RequiredBeforeCallEstablishment $False -RequiredDuringCall $False -RequiredBeforeMeetingJoin $False -RequiredDuringMeeting $False
image-20250408-123138.png

Configurations for PAIR Imagicle Application

Enter the following PowerShell commands replacing the variables as described below:

POWERSHELL
$AppInstancePair = New-CsOnlineApplicationInstance -UserPrincipalName $VirtualUserPair -ApplicationId $ApplicationIdPair -DisplayName $AppNamePair
  • $VirtualUserPair should be a new unique UPN within your Tenant. As a guideline, Imagicle suggests to enter a username like "imagicle_call_recordingHA@yourdomain.com". You can't use an existing UPN associated to an MS Teams user.

  • $ApplicationIdPair is the PAIR AppID provided by Imagicle.

  • $AppNamePair is a name of your choice, like “ImagicleCallRecordingHA”

Now proceed with next command:

POWERSHELL
Sync-CsOnlineApplicationInstance -ObjectId $AppInstancePair.ObjectId -ApplicationId $AppInstancePair.ApplicationId

Now it is time to create a new Compliance Recording Policy:

POWERSHELL
New-CsTeamsComplianceRecordingPolicy -Identity imagicle_recHA -Enable $true

Next command creates a Recording Application:

POWERSHELL
New-CsTeamsComplianceRecordingApplication -Identity ("Tag:imagicle_recHA/" + $AppInstancePair.ObjectId) -RequiredBeforeCallEstablishment $False -RequiredDuringCall $False -RequiredBeforeMeetingJoin $False -RequiredDuringMeeting $False
image-20250408-124216.png

Application Pairing

Please enter the following command to pair both Recording Applications to Imagicle Application:

POWERSHELL
 Set-CsTeamsComplianceRecordingApplication -Identity ("Tag:imagicle_rec/" + $AppInstance.ObjectId) -ComplianceRecordingPairedApplications @(New-CsTeamsComplianceRecordingPairedApplication -Id $AppInstancePair.ObjectId)
image-20250408-124406.png

Grant Recording Enablement to MS-Teams users

Now it's time to assign newly defined Recording Policies to a Call Recording user, by executing the following commands as many times as the number of users to enable:

POWERSHELL
Grant-CsTeamsComplianceRecordingPolicy -Identity $UserUPN -PolicyName imagicle_rec
  • $UserUPN is the MS Teams user’s UPN and it is case-sensitive!

If you wish to disable the audio prompt to notify remote party about ongoing audio recording, please execute the following command:

POWERSHELL
Set-CsTeamsComplianceRecordingPolicy -Identity $UserUPN -DisableComplianceRecordingAudioNotificationForCalls $true
  • $UserUPN is the MS Teams user’s UPN

Once done, you can double check proper Recording Policy association to a user by issuing the following command:

POWERSHELL
Get-CsOnlineUser $UserUPN | ft sipaddress, tenantid, TeamsComplianceRecordingPolicy

Configurations from Imagicle UCX Cloud Platform web portal

Imagicle team creates a local service user account with username=msrecorder. This account is used to retrieve recording audio streams from MS-Teams cloud.

Please make sure you are not deleting or changing the password for that user without notifying Imagicle

Make sure that the users on the Imagicle UCX Suite web portal have set "PBX username" field with user’s UPN (same as "email" field), in each Imagicle recording-enabled user.

Imagicle App for MS Teams client/web/mobile

Imagicle provide an app for MS-Teams client. Please follow this link for the configuration.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.