Sep 23 2020 08:46 AM - edited Sep 23 2020 09:32 AM
Greetings,
I want send message Microsoft Stream video link.
In Teams App, paste the MS Stream Video address into the message entry window.
This image is automatically created.
I want to send this using Graph API.
I tried with attachment, but I failed with message that id is not present in body.
var channel = await graphClient.Teams[pClassId].PrimaryChannel
.Request()
.GetAsync();
var chatMessage = new ChatMessage
{
Body = new ItemBody
{
ContentType = BodyType.Html,
Content = ""
},
Attachments = new List<ChatMessageAttachment>()
{
new ChatMessageAttachment
{
ContentType = "reference",
ContentUrl = streamurl
}
}
};
resultChatMsg = await graphClient.Teams[pClassId].Channels[channel.Id].Messages
.Request()
.AddAsync(chatMessage);
How can I implement it?
Thank you for any help.
Sep 29 2020 12:03 AM