Download and Run Microsoft Script

The Microsoft Script must be run in Day Two whenever you update Group Mapping to Recording Profiles (adding or removing members on Azure Portal in AAD group or adding or removing groups in Live Platform profile) and whenever you change MSFT Policy. This script synchronizes with your M365 platform.

If you have already downloaded the script in Modifying Recording Profiles proceed to Step 5 below.

Do the following:
1. In the Icon pane, click , and then in the Navigation pane, select Recording Settings > Recording Profiles.

2. Select the Recording Profile whose script you wish to download, click the right-click menu link, and then choose MSFT Scripts.

3. Click the Download button to download the script or the copy button to copy the script to clipboard.
4. Click the Download Configuration Script link to download the PowerShell script to your PC.
5. Run the script createProfileSuperProfile-dd-m-yyyy.ps1 as Administrator.

6. Enter the credentials of the Azure customer tenant account and authenticate using the Microsoft Authenticator when prompted.

The script supports Multifactor authentication.

Notice that the Recording Profile has already been created, therefore the script updates the existing policy.

See example log file below (saved to Desktop on PC where the script is run).

Copy
**********************
Windows PowerShell transcript start
Start time: 20240616123342
Username: LAPTOP-M8LNK8BQ\USER
RunAs User: LAPTOP-M8LNK8BQ\USER
Configuration Name: 
Machine: LAPTOP-M8LNK8BQ (Microsoft Windows NT 10.0.19045.0)
Host Application: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Users\USER\Desktop\Powershell\editProfileSuperProfile-16-6-2024.ps1
Process ID: 19148
PSVersion: 5.1.19041.4522
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.4522
BuildVersion: 10.0.19041.4522
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\USER\desktop\MSTC_Policy06.16.12.33.txt
PS>TerminatingError(Invoke-RestMethod): "{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"00-1fa6a9561e39115c5b5258f162c5540d-a5c8015bfcd9c025-00"}"
6/16/2024 12:33:43 PM - Searching 'MicrosoftTeams' module...
6/16/2024 12:33:47 PM - 'MicrosoftTeams' module installed successfully.
6/16/2024 12:33:47 PM - Importing 'MicrosoftTeams' module...
INFO: Loaded Module 'Microsoft.Teams.ConfigAPI.Cmdlets'
6/16/2024 12:33:52 PM - 'MicrosoftTeams' module imported successfully.
6/16/2024 12:35:10 PM - Connected to Microsoft Teams successfully.
6/16/2024 12:35:10 PM - Getting recording policies...
6/16/2024 12:35:12 PM - Retrieved recording policies successfully.
6/16/2024 12:35:12 PM - fetching domains...
6/16/2024 12:35:15 PM - Domain M365x21689653.onmicrosoft.com fetched successfully.
6/16/2024 12:35:15 PM - SuperProfile06062024142032 already exists. Skipping policy creation.
6/16/2024 12:35:15 PM - Application Instance for SuperProfile06062024142032 already exist.
6/16/2024 12:35:16 PM - Starting Sync Process for SuperProfile06062024142032 ...
6/16/2024 12:35:18 PM - Sync Process for SuperProfile06062024142032 Finished.
6/16/2024 12:35:18 PM - SuperProfile06062024142032 already exist , skipping..
6/16/2024 12:35:18 PM - Configuring SuperProfile06062024142032 Recording Policy...
6/16/2024 12:35:24 PM - Configuring disconnectCalls True for SuperProfile06062024142032...
6/16/2024 12:35:26 PM - Configuring audioNotification False for SuperProfile06062024142032...
6/16/2024 12:35:27 PM - SuperProfile06062024142032 Recording Policy Has Been Configured.
6/16/2024 12:35:27 PM - Assigning groups to primary policy...
Adding 4d93b1c7-f944-4e82-a372-1ebe23979c6e to SuperProfile06062024142032.. please wait..
WARNING: Group 4d93b1c7-f944-4e82-a372-1ebe23979c6e already assigned to SuperProfile05302024155452 policy.
Force Assignment set to True, adding 4d93b1c7-f944-4e82-a372-1ebe23979c6e to SuperProfile06062024142032.. please wait..
Sending following status to API....
{
    "TenantId":  "5f4e3129-dd39-4ccd-bc4f-98423bee2c1b",
    "Message":  "Success",
    "PolicyId":  "SuperProfile06062024142032",
    "StatusCode":  0
}

Results sent successfully and should be reflected in the UI
**********************
Windows PowerShell transcript end
End time: 20240616123533
**********************
7. Once you have successfully run the script, verify that the Recording Profile status is 'Successful'.