Forum Discussion
paulnerie
Apr 23, 2025Copper Contributor
Getting Teams meeting transcripts using Powershell with Graph API
I have set up an Enterprise App in Entra with the following API permissions:
Microsoft.Graph
OnlineMeetings.Read (Delegated)
OnlineMeetings.Read.All (Application)
User.Read.All (Application)
Admin consent has been granted for the Application types.
Below is the code snippet for getting the meetings:
$tenantId = "xxxxxx"
$clientId = "xxxxxx"
$clientSecret = "xxxxxx"
$secureSecret = ConvertTo-SecureString $clientSecret -AsPlainText -Force
$psCredential = New-Object System.Management.Automation.PSCredential ($clientId, $secureSecret)
Connect-MgGraph -TenantId $tenantId -ClientSecretCredential $psCredential -NoWelcome
$meetings = Get-MgUserOnlineMeeting -UserId "email address removed for privacy reasons" -All
Connect-MgGraph is invoked without errors. I had verified this with Get-MgContext command.
At line 10 I get this error:
Status: 404 (NotFound) ErrorCode: UnknownError
I don't know if this is means there was an error in the API call, or there were no records found (I do have Teams calls with transcripts though).
I have tried changing the last line to (without -All):
$meetings = Get-MgUserOnlineMeeting -UserId "my guid user id here"
And I get this error:
Status: 403 (Forbidden) ErrorCode: Forbidden
Adding -All parameter results in this error:
Filter expression expected - /onlineMeetings?$filter={ParameterName} eq '{id}'.
I've done some searching but I haven't found any more information nor solution for this. I hope someone can point me in the right direction.
Thanks in advance!
No RepliesBe the first to reply