This guide provides an Azure Administrator instructions to integrate an organization's Microsoft Teams account with Conversation AI. Configuring this integration allows Teams meetings to be recorded and transcribed by Conversation AI. Teams meetings will also generate Events in Salesforce for meeting events.
To do this, we use Microsoft’s recommended approach: attach an Azure Bot as an Application Instance to a Compliance Recording Policy and attach that Policy to specific users, groups, or globally. Once attached, the policy ensures that the Azure Bot receives an invitation to each meeting a user joins.
The Azure Bot (sometimes referred to as the Microsoft Teams Service or Microsoft Teams Bot) joins a meeting when invited (as an invisible participant) and (based on your settings) subscribes to individual audio and video streams for each participant. We transcribe these streams in real-time and store the transcripts and recording so you can access them conveniently through Conversation AI.
This functionality is available when a user is added to the Azure Compliance Recording Policy. Administrators that wish to roll these features out to a small group of users before deploying to a larger group should ensure that only the intended users are added to the recording policy.
Access Scope
To enable this functionality, the Azure Bot needs admin consent to use the following scopes:
- Calls.AccessMedia.All - Allows bot to get audio/video
- Calls.JoinGroupCall.All - Allows bot to join a call
- OnlineMeetingArtifacts.Read.All - Allows bot to get meeting topic and participant info
- User.Read.All - to make onboarding and administration easy
We also require an Application Access Policy that allows our application to access meetings on behalf of a user to get a detailed list of participants in a meeting.
Automatic Integration Steps
-
Getting Started
Before beginning, please ensure the following:
- You have provided Revenue.io Support with your Microsoft Tenant ID and you can see the option for Microsoft Teams in your account Integration Settings.
- You are a Microsoft 365 Administrator with permission to run PowerShell Commands and Scripts
-
1/9: Install PowerShell
Install PowerShell using the following link:
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell -
2/9: Open PowerShell
Launch the Command Prompt and open PowerShell with Administrator privileges.
Run the following command in Command Prompt (Win) or Terminal (Mac):pwsh
-
3/9: Install the Microsoft Teams PowerShell module
More information on the Microsoft Teams Powershell Module can be found here:
https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview
Run the following commands to install in PowerShell:Install-Module -Name MicrosoftTeams -RequiredVersion "5.6.0"
There appears to be an issue with the latest version of the "MicrosoftTeams" Powershell Module. Customers have reported successfully integrating after downgrading to version 5.6.0.
To check your current installed MicrosoftTeams Module version, run:Get-InstalledModule -Name "MicrosoftTeams"
To downgrade, run:Uninstall-Module -Name MicrosoftTeams -AllVersions -Force
Install-Module -Name MicrosoftTeams -RequiredVersion "5.6.0"
-
4/9: Create a Microsoft 365 Group for Revenue.io users
Navigate to https://admin.microsoft.com/
- Click Teams & Groups
- Click Active Teams & Groups
- Create a new Group for your Revenue.io Users
- Select the Group and copy this Group ID somewhere for a later step
- For Microsoft 365 Groups, the Group ID is the group email
- For Security Groups, the Group ID can be found in the URL:
https://admin.microsoft.com/#/groups/:/TeamDetails/{{GROUP-ID}}
- Click Membership, select Members and "Add Members"
- Add all Revenue.io users to this Group.
-
5/9: Make the app available in Teams
Navigate to https://admin.teams.microsoft.com/
- Click Teams Apps; Manage Apps; + Upload new app
- Download revenue-bot.zip or revenue-bot-with-moments.zip at the bottom of this article
- Click Teams Apps; Permissions policies; Global (Org-widedefault)
- Under Custom Apps, ensure "Allow specific apps and block all others" or "Allow all apps" is selected
- Click Add apps. If you don't see this button, click "Allow apps" instead.
- Search for "Revenue"
- Click Allow
- Click Save
-
6/9: Download and run Powershell script
- Scroll down to the bottom of this article and find the Attachments section. This is where the most up to date version of our integration script can be found.
- Download the PowerShell script revenue-msteams-setup.ps1 and save it to a location you will be able to find.
The PowerShell script can be opened in any text editor to view its contents. Throughout the script, comments and debug statements are included to explain each step of the setup process, helping you understand the purpose of each command.
Windows Users:
- Find revenue-msteams-setup.ps1 in your File Explorer
- Right click on the file
- Select "Run with PowerShell"
Mac Users:
- Open Terminal
- Run the command
pwsh ~/Downloads/revenue-msteams-setup.ps1
- If you downloaded the PowerShell setup script to a different folder than your Downloads folder, you will need to include the correct path to the script.
-
7/9: Follow script instructions
The PowerShell setup script will guide you through the remaining steps to configure the Revenue.io Teams integration.
- If you wish to set a single user's TeamsComplianceRecording policy, input their UserID. If you are configuring this for a group of users (recommended), you can hit enter to skip this step.
- When prompted to
Enter the Group account of the MS Teams group you want to configure
, input the GroupID you saved from step 4 and press enter. - Double check that you entered your UserID or GroupID correctly, then press enter.
-
8/9: Wait for the script to finish
It could take between 10 to 15 minutes for the script to finish if this is your first time running it. Several steps require waiting until changes finish propagating in your Microsoft tenant. Please be patient while the script is running.
The following policies and objects are being created:
- Application Instance (Bot User): Revenue@$domain.com
- Compliance Recording Policy: RevenueRecordingPolicy
- Compliance Recording Application
- Application Access Policy
The setup script can be run multiple times to enable the integration for multiple user or groups, or if you needed to abort a previous run. It will not create duplicate policies or objects.
If you encounter any unresolvable issues, please contact support@revenue.io so we can assist you. Attach the 'revenue-msteams.log' file, which is generated in the same folder as your script.
-
9/9: Validate user account mappings (and update if needed)
Navigate to https://app.ringdna.net and login using your Salesforce credentials.- Click the Account tab on the left menu
- Click Integrations on the top menu
- Click Manage Connected Users under the Video Integrations section
Manual Integration Steps
-
While our automatic script offers a more time efficient set up, we understand there are factors which may make manual integration preferable for you. These instructions provide you all of the steps and PowerShell commands to integrate Microsoft Teams with Revenue.io manually.
-
1/14: Install PowerShell
Install PowerShell using the following link:
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell
-
2/14: Open PowerShell
Launch the Command Prompt and open PowerShell with Administrator privileges.
Run the following command in Command Prompt (Win) or Terminal (Mac):pwsh
-
3/14: Install the Microsoft Teams PowerShell Module
More information on the Microsoft Teams Powershell Module can be found here:
https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview
Run the following commands to install in PowerShell:Install-Module -Name MicrosoftTeams -RequiredVersion "5.6.0"
There appears to be an issue with the latest version of the "MicrosoftTeams" Powershell Module. Customers have reported successfully integrating after downgrading to version 5.6.0.
To check your current installed MicrosoftTeams Module version, run:Get-InstalledModule -Name "MicrosoftTeams"
To downgrade, run:Uninstall-Module -Name MicrosoftTeams -AllVersions -Force
Install-Module -Name MicrosoftTeams -RequiredVersion "5.6.0"
$teams = Connect-MicrosoftTeams
$tenantId = $teams.TenantId.Guid
$domain = $teams.Tenant.Domain
-
4/14: Create a policy that invites Revenue to join calls/meetings.
For additional background on Teams recording policies, please see: Introduction to Teams Policy-based Recording for Calling & Meetings - Microsoft Teams
Run the following commands to install in PowerShell:$appId = "52261ce2-c62e-41fd-80de-d0252e57b7d5"
$appInstance = New-CsOnlineApplicationInstance -UserPrincipalName revenue@$domain -DisplayName Revenue -ApplicationId $appId
$objectId = $appInstance.ObjectId
-
5/14: Create a new Teams Compliance Recording Policy
Run the following command in PowerShell:New-CsTeamsComplianceRecordingPolicy -Identity RevenueRecordingPolicy -Enabled $true -Description "Recording policy for Revenue.io"
-
6/14: Attach the new policy to the Application Instance
Setting all the 'required' options to false ensures that the user is still able to join the meeting if there are any failures.
Run the following command in PowerShell:Set-CsTeamsComplianceRecordingPolicy -Identity RevenueRecordingPolicy -ComplianceRecordingApplications @(New-CsTeamsComplianceRecordingApplication -Id $objectId -Parent RevenueRecordingPolicy -RequiredBeforeMeetingJoin $false -RequiredDuringMeeting $false -RequiredBeforeCallEstablishment $false -RequiredDuringCall $false)
-
7/14: Configure an Application Access policy
Run the following commands in PowerShell:
New-CsApplicationAccessPolicy -Identity RevenueAccessPolicy -AppIds "$appId" -Description "Revenue Application Access"
Grant-CsApplicationAccessPolicy -PolicyName RevenueAccessPolicy -Global
-
8/14: Grant admin consent to the application
Run the following command in PowerShell:Start-Process "https://login.microsoftonline.com/$tenantId/adminconsent?client_id=$appId"
Authenticate with an admin user in your Microsoft account and grant access. Once completed, you will be routed to https://app.ringdna.net/ -
9/14: Create a Microsoft 365 Group for Revenue.io users
Navigate to https://admin.microsoft.com/- Click Teams & Groups
- Click Active Teams & Groups
- Create a new Group for your Revenue.io Users
- Select the Group and make a note of the Group ID
- For Microsoft 365 Groups, the Group ID is the group email
- For Security Groups, the Group ID can be found in the URL:
https://admin.microsoft.com/#/groups/:/TeamDetails/{{GROUP-ID}}
- Click Membership, select Members and "Add Members"
- Add all Revenue.io users to this Group.
-
10/14: Grant your policy to users and groups
We now need to apply the policies created in step 5 to your users. This can be applied to the group we created in the previous step. Note: Any policies applied to the user directly will supersede a group policy.
Run the following command in PowerShell:
- Replace group.name@$domain with the GroupID you wrote down in the previous step.
New-CsGroupPolicyAssignment -GroupId group.name@$domain -PolicyType TeamsComplianceRecordingPolicy -PolicyName RevenueRecordingPolicy -Rank 1
You can repeat this step or choose multiple methods (e.g., run the group command to grant the policy for a few groups and then run the user command to grant for select users outside of those groups.)
For additional commands/flexibility in policy attachment approaches, visit the Microsoft Teams PowerShell documentation
Run the following command in PowerShell:-
To a user (replacing first.last@domain)
Grant-CsTeamsComplianceRecordingPolicy -Identity first.last@$domain -PolicyName RevenueRecordingPolicy
-
To a group (replacing group.name@domain)
New-CsGroupPolicyAssignment -GroupId group.name@$domain -PolicyType TeamsComplianceRecordingPolicy -PolicyName RevenueRecordingPolicy -Rank 1
-
Globally
Grant-CsTeamsComplianceRecordingPolicy -Global -PolicyName RevenueRecordingPolicy
- Replace group.name@$domain with the GroupID you wrote down in the previous step.
-
11/14: Make the app available in Teams
Navigate to https://admin.teams.microsoft.com/- Click Teams Apps > Manage Apps > + Upload new app
- Download revenue-bot.zip or revenue-bot-with-moments.zip at the bottom of this article
- Click Teams Apps > Permissions policies > Global (Org-wide default)
- Under Custom Apps, ensure "Allow specific apps and block all others" or "Allow all apps" is selected
- Click Add apps. If you don't see this button, click "Allow apps" instead.
- Search for "Revenue"
- Click Allow
- Click Save
-
12/14: Pin the Revenue App for users (Optional)
While still in the Teams Admin Center
- Click Teams Apps > Setup Policies > Manage Policies
If your users already have App Setup Policies Configured, update each policy to add the Revenue app as a "Pinned App".
If an App Setup Policy does not exist for your users- Click Add > Name your App Setup Policy
-
Under Installed Apps, click Add Apps and search for Revenue.io
- You can search for additional apps you want pinned for your team here too
- Under Pinned Apps, order your list in a way that makes sense for your team
- Click Save and Navigate back to Setup Policies
- Click the Group Policy Assignment Tab
- Click Add > In the "Assign Policy to Group" window, search for the Revenue.io Users group you created in step 9. You can also select additional groups.
- Under "Select a policy" choose the App Setup Policy you just created.
- Set rank to "1"
- Click Apply
-
13/14: Add embedded Moments™ Tab (if using Moments™)
Navigate back to https://admin.teams.microsoft.com/
- Click Teams Apps > Manage Apps > Search by name > type ‘Revenue’
- Click on the Revenue app to open this page
- Download revenue-app-with-moments-1.0.5.zip at the bottom of this page. Click "Upload File" under new version and select this file.
- Click ‘Permissions’ and ensure you see a banner that says "Admin consent granted for all required permissions."
- If you do not see this banner, click ‘Review permissions and consent’
- A new window opens asking to pick an account with admin permissions.
- Access to "Sign in and read user profile" will be requested. This is necessary for the app to identify the user in the Moments™ tab.
- Click Accept
-
14/14: Validate user account mappings (and update if needed)
Navigate to https://app.ringdna.net and login using your Salesforce credentials.- Click the Account tab on the left menu
- Click Integrations on the top menu
- Click Manage Connected Users under the Video Integrations section
-
Steps Complete
All technical implementation steps are complete.
To get started using the integration, have your team restart their Microsoft Teams app.
Read and share the following article with your users to familiarize them with the feature and recording controls: Microsoft Teams Recording Controls
Managing User Recording Policy Assignment
After completing the integration setup, you may need to modify your recording policy assignment from time to time. Please refer to the powershell commands below:
Individual Users
-
To assign a recording policy to an individual user (replacing first.last@domain):
Grant-CsTeamsComplianceRecordingPolicy -Identity first.last@$domain -PolicyName RevenueRecordingPolicy
- To view the current policy assignment for a user (replacing first.last@domain):
Get-CsOnlineUser -Identity first.last@$domain | Select-Object -ExpandProperty 'TeamsComplianceRecordingPolicy'
-
To unassign a recording policy from an individual user (replacing first.last@domain):
Grant-CsTeamsComplianceRecordingPolicy -Identity first.last@$domain -PolicyName $null
Groups (Recommended)
-
To assign a recording policy to a a security group or distribution list (replacing group.name@domain with your groupId):
New-CsGroupPolicyAssignment -GroupId group.name@$domain -PolicyType TeamsComplianceRecordingPolicy -PolicyName RevenueRecordingPolicy -Rank 1
- To view the current policy assignment for a group:
Get-CsGroupPolicyAssignment -PolicyType TeamsComplianceRecordingPolicy
- To remove the recording policy assigned to a group (replacing group.name@$domain with the resulting GroupID from Get-CsGroupPolicyAssignment):
Remove-CsGroupPolicyAssignment -GroupId group.name@$domain -PolicyType TeamsComplianceRecordingPolicy
- Group Policies apply to all users added as members. They do not apply to owners of a group.
- It takes several minutes for new group memberships to propagate to the Teams compliance recording policy rule evaluator. If you have added new members to a group, please wait at least 10 minutes before testing the integration with newly added users.
Global
- To assign a recording policy to the entire Tenant:
Grant-CsTeamsComplianceRecordingPolicy -Global -PolicyName RevenueRecordingPolicy