Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
Graph .NET
>
Tutorial
> Get meeting recordings
The following example shows you how to get recordings for an online meeting.
C# example
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Independentsoft.Graph; using Independentsoft.Graph.Users; using Independentsoft.Graph.Calendars; namespace Sample { class Program { static async Task Main(string[] args) { try { GraphClient client = new GraphClient(); client.ClientId = "63333333-209e-454e-b7bd-55a4d201270f"; client.Tenant = "independentsoft.onmicrosoft.com"; client.ClientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; UserId userId = new UserId("info@independentsoft.onmicrosoft.com"); string meetingId = "meeting-id-123"; IList<CallRecording> recordings = await client.GetOnlineMeetingRecordings(meetingId, userId); for (int i = 0; i < recordings.Count; i++) { Console.WriteLine("Id = " + recordings[i].Id); Console.WriteLine("CreatedDateTime = " + recordings[i].CreatedDateTime); byte[] content = await client.GetOnlineMeetingRecordingContent(meetingId, recordings[i].Id, userId); File.WriteAllBytes("Recording_" + i + ".mp4", content); Console.WriteLine("Saved recording to file."); Console.WriteLine(""); } Console.Read(); } catch (GraphException ex) { Console.WriteLine("Error: " + ex.Code); Console.WriteLine("Message: " + ex.Message); Console.Read(); } } } }
VB example
Imports System.Collections.Generic Imports System.IO Imports Independentsoft.Graph Imports Independentsoft.Graph.Users Imports Independentsoft.Graph.Calendars Namespace Sample Class Module1 Shared Sub Main(ByVal args As String()) Dim task = New Task(AddressOf Run) task.Start() Console.Read() End Sub Shared Async Sub Run() Try Dim client As GraphClient = New GraphClient() client.ClientId = "63333333-209e-454e-b7bd-55a4d201270f" client.Tenant = "independentsoft.onmicrosoft.com" client.ClientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" Dim userId As UserId = New UserId("info@independentsoft.onmicrosoft.com") Dim meetingId As String = "meeting-id-123" Dim recordings As IList(Of CallRecording) = Await client.GetOnlineMeetingRecordings(meetingId, userId) For i As Integer = 0 To recordings.Count - 1 Console.WriteLine("Id = " & recordings(i).Id) Console.WriteLine("CreatedDateTime = " & recordings(i).CreatedDateTime) Dim content As Byte() = Await client.GetOnlineMeetingRecordingContent(meetingId, recordings(i).Id, userId) File.WriteAllBytes("Recording_" & i & ".mp4", content) Console.WriteLine("Saved recording to file.") Console.WriteLine("") Next Catch ex As GraphException Console.WriteLine("Error: " + ex.Code) Console.WriteLine("Error: " + ex.Message) Console.Read() End Try End Sub End Class End Namespace
Need help? Ask our developers:
Name*
Email*
Message*