You need to configure Auto-Recording in Teams Admin Center:
- Go to the Microsoft Teams Admin Center.
- Navigate to Meetings > Meeting policies.
- Edit an existing policy or create a new one.
- Set the Allow cloud recording option to On.
- Set the Record automatically option to On.
- Assign this policy to the users who need auto-recording.
This policy will automatically start recording when a meeting begins for users assigned to it.
Create an Online Meeting using Microsoft Graph API
You can create an online meeting using the Microsoft Graph API in PowerShell.
Connect-MgGraph -Scopes "OnlineMeetings.ReadWrite"
# Define the parameters for the meeting
$startTime = (Get-Date).ToUniversalTime().AddMinutes(15) # Meeting starts in 15 minutes
$endTime = $startTime.AddHours(1) # 1 hour duration
# Create the online meeting
$meeting = New-MgUserOnlineMeeting -UserId 'user@akdotms.cloud' -Subject "Auto-Recorded Meeting" -StartDateTime $startTime -EndDateTime $endTime -IsRecordingEnabled $true
# Output the meeting details
$meeting
Once the meeting is complete, the recording will be stored in OneDrive or SharePoint, and the transcript will be accessible via Microsoft Graph.
# Get meeting details using the meeting ID
$meetingId = $meeting.Id
$meetingDetails = Get-MgUserOnlineMeeting -UserId 'user@akdotms.cloud' -OnlineMeetingId $meetingId
# Output meeting details including recording URL
$meetingDetails.recording
Best regards,
Aleksandr
If the response is helpful, please click "Accept Answer" and upvote it.