I have a task to get e-mail from Exchange Server and save it as file attachement to CRM. I'm using Microsoft Graph SDK and C# to connect to Exchange Server.
I can get a mail as Microsoft.Graph.Message and I need to convert Microsoft.Graph.Message type to byte array to be able to save it to CRM.
I really don't know how. I've tried serialization by BinaryFormatter but the type Microsoft.Graph.Message is not marked as serializable.
I really don't have clue what to do now. Please can someone advice me? Thank you.