Skip to content
  • There are no suggestions because the search field is empty.

Granting HubSpot Access to Teams Meeting Recordings via PowerShell

Process for syncing MS Teams meetings recordings and transcripts to HubSpot with PowerShell.

permissions-ms-teams-connection-powershell

If you're not the owner of the Microsoft organisation account, HubSpot will ask you to grant MS Teams access using PowerShell.

Before performing the below, ensure you have installed the full  version of Microsoft Teams to HubSpot.

1. Run PowerShell on your device

  • For Mac:open Terminal and run pwsh to launch PowerShell.
  • For Windows: search for 'PowerShell' in your PC, then click Run as administrator. 
    Run PowerShell

2. Install Teams PowerShell Module by entering this command on PowerShell:

Install-Module -Name MicrosoftTeams

Install Teams PowerShell Module

3. Enter the below command to connect to MS Teams:

Import-Module MicrosoftTeams

If you see an error like this, 

PowerShell error

You need to set a less restrictive Execution Policy, such as RemoteSigned:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Execution Policy PoweShell

Then, try entering the import command again: Import-Module MicrosoftTeams

There should be no  more error.

4. Connect MS Teams: Connect-MicrosoftTeams

This will open up a new window for logging in to your Microsoft account:
Connect MS Teams

Once logged in, PowerShell will show your account info:
MS Teams Info on PowerShell

5. Run this command to create HubSpot access policy:

New-CsApplicationAccessPolicy -Identity MY-APP-POLICY -AppIds "0493df14-0cd5-4c89-b413-e0b9b90bbb17" -Description "Policy to enable HubSpot for Teams meeting sync."

6. Grant permissions to your HubSpot account or other users:

Grant-CsApplicationAccessPolicy -PolicyName MY-APP-POLICY -Identity "USER_ID”

  • User ID: this is the user's email address on MS Teams

If you want to grant these permissions to all existing users, run this command: Get-CsOnlineUser | Grant-CsApplicationAccessPolicy -PolicyName MY-APP-POLICY

If you want to gran these permissions to all existing and future users, run this command: Grant-CsApplicationAccessPolicy -PolicyName MY-APP-POLICY-2 -Global