Cannot save Calander events as an ics file with attachments using grapi APi c#

Copper Contributor

Hello

 

I am able to save email messages from office 365 outlook server with attachments. For this I am getting stream of a message and saving this stream to a msg file.

var message = await graphClient.Users[emailId].Messages[key].Content.Request().GetAsync()

using (FileStream outputFileStream = new FileStream(Path.Combine(path,r.Next() + ".ics"), FileMode.Create))
{
message.CopyTo(outputFileStream);
}

 

In case of calendar event, I am able to save that event but attachments are missing for it.

How do I save calendar events/meetings to ics file with attchments?

 

 

0 Replies