Issue with conversion from eml to msg with attached AIP protected email

Hi Team,

We are trying to convert eml file to msg file. The eml file is having AIP(azure information protection) protected msg file. After conversion, I am not able to view the content of the message however ; from eml file, I am able to read the file. Are we changing any metadata of attached msg file while converting from eml to msg? Somehow, I am loosing access to see the content after conversion.

Please let me know if you have any questions.

MailMessage eml = MailMessage.Load(filePath);
var mapiMessage = MapiMessage.FromMailMessage(eml, new MapiConversionOptions(OutlookMessageFormat.Unicode));
string msgFilePath = Path.Combine(Path.GetDirectoryName(filePath), Path.GetFileNameWithoutExtension(filePath) + “.msg”);
mapiMessage.Save(msgFilePath);
Thanks,
Brijesh Singh

@brijesh.singh,

Can you please share source file so that we may further investigate to help you out.