问题
Given:
- We use EWS API to download email messages from Office 365 (Exchange Online)
- When emails are encrypted using AIP, body comes in encrypted
- Admin user is super-user - this user's creds are used to make requests against EWS
Ask:
- In order to decrypt, it seems that we need to use
https://docs.microsoft.com/en-us/information-protection/develop/concept-handler-protection-cpp
. Is this the correct API to use? - If so, above API is in C++. Is there anything available in C#?
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?
回答1:
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.
来源:https://stackoverflow.com/questions/55732310/azure-information-protection-how-to-decrypt-emls-coming-from-ews-api