Given:
Ask:
https://learn.microsoft.com/en-us/information-protection/develop/concept-handler-protection-cpp
. Is this the correct API to use?
Simple samples of how to decrypt a message would be appreciated?
Final question, is there a way to avoid decryption all together by setting some higher-level permission on the user that we use for EWS?
We shipped support this week for decryption of MSG files. We don't yet support protected EML files. You may be able to convert the EML to MSG, then use the functionality we announced here to decrypt.
The File API package is available via NuGet. This package includes both .NET and native libraries.
All of our samples are available here. I haven't published a decryption example, yet, but you need to call FileHandler.RemoveProtection() followed by FileHandler.CommitAsync() and that'll give you the decrypted output.