private static async Task AddGroupConversationThread(GraphServiceClient graphClient) { var posts = new ConversationThreadPostsCollectionPage(); posts.Add(new Post { Body = new ItemBody { Content = "Welcome to this group!", ContentType = BodyType.Text, } }); var ct = new ConversationThread { Topic = "The Microsoft Graph SDK!", Posts = posts }; var unifiedGroups = await graphClient.Groups .Request() .Filter("groupTypes/any(grp: grp eq 'Unified')") .GetAsync(); var groupEvents = await graphClient .Groups[unifiedGroups.FirstOrDefault().Id].Threads .Request() .AddAsync(ct); }
private static async Task AddGroupConversationThread(GraphServiceClient graphClient) { var posts = new ConversationThreadPostsCollectionPage(); posts.Add(new Post { Body = new ItemBody { Content = "Welcome to this group!", ContentType = BodyType.Text, } }); var ct = new ConversationThread { Topic = "The Microsoft Graph SDK!", Posts = posts }; var unifiedGroups = await graphClient.Groups .Request() .Filter("groupTypes/any(grp: grp eq 'Unified')") .GetAsync(); var groupEvents = await graphClient .Groups[unifiedGroups.FirstOrDefault().Id].Threads .Request() .AddAsync(ct); }