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 | ||
---|---|---|
| ||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force |
...
Code Block | ||
---|---|---|
| ||
Install-Module MicrosoftTeams |
Accessing the tenant via PowerShell
Note | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
Grant-CsApplicationAccessPolicy -PolicyName "<Policy Name>" -Global |
...