I am working on a Windows standalone application. [ I can not disclose the name as per our company policy] I installed Azure Information Protection Client. Then I protected the Word file with the below steps:
- Go to File ribbon > Info tab
- "Protect Document" button > Restrict Access > Restricted Access
- Check "Restrict permission to this document" > OK
- Save the document > Exit the application
Now my Application tries to parse this restricted file with the below steps.
- Unzip the Word file
- Read the OOXML content and extract needed information
- Create an output file with this extracted information but the application cannot unzip the word file because it is restricted.
So my question is do we have any Microsoft API to unzip the restricted file? is there any other way to read OOXML data from such a restricted file?
by including MIP SDK (https://learn.microsoft.com/it-it/information-protection/develop/) in your application, you can use this function:
to get a decrypted temporary version of the protected file, so that the rest of your application goes on as normal.
MIP SDK should be configured to run with an account that is allowed to access the protected file, or run as "superuser", so that the process can access any protected file.
Evaluate carefully the protection scenario before using the superyuser feature.