Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites

Step 1 - Download and install PowerShell 5.1.

Step 2 - Open PowerShell as administrator.

Step 3 - Install the NuGet package provider module by running the following command:

Code Block
languagepowershell
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

...

Code Block
languagepowershell
Install-Module MicrosoftTeams

Accessing the tenant via PowerShell

Note
titleSeparate Azure tenants for the recording provider (bot) and for the Teams environment to record

In the case when the recorded Teams environment and the recording bot are in separate Microsoft Entra (formerly Azure AD) tenants, the following steps have to be done in the Teams tenant.

...

Step 3 - A login prompt will show up. Provide the user credentials.

Creating Application Access Policy

Step 4 - Execute the following command. Replace the <Policy Name> part with a unique name for the policy. Replace the <Bot App ID> part with the Application (Client) ID of the App Registration of the Bot. Replace the <Description> with a description.

Code Block
languagepowershell
New-CsApplicationAccessPolicy -Identity "<Policy Name>" -AppIds "<Bot App ID>" -Description "<Description>"

Step 5 - Execute the following command. Replace the <Policy Name> part with the name provided in the previous command.

Code Block
languagepowershell
Grant-CsApplicationAccessPolicy -PolicyName "<Policy Name>" -Global

...