How to Parse RMS-Encrypted Word Documents
Question details
The user needs to programmatically parse or extract data from Microsoft Word documents protected by Microsoft Rights Management Services (RMS).

- Product
- Microsoft Word
- Device & OS
- Windows
- Scenario
- Attempting to extract OOXML data from a restricted Word document using standard ZIP and OOXML parsing methods in a standalone application.
- Observed behavior
- Standard extraction fails because the document contents are encrypted and access-controlled by RMS, preventing normal unzipping of the DOCX file.
Ensure you have the appropriate Azure Information Protection credentials and administrative access required to request decryption keys for restricted documents.
Implement the Microsoft Information Protection (MIP) SDK
The recommended approach for developers to read, authenticate, and decrypt RMS-protected files programmatically.
Standard DOCX files are essentially ZIP archives containing XML files. However, when protected via 'Restrict Access' in Microsoft Word, the file structure is encrypted. You cannot simply unzip them. Instead, you must use Microsoft's official APIs to authenticate and decrypt the content before parsing the OOXML data.
Download and set up the Microsoft Information Protection (MIP) File SDK for your specific development environment.
Register your standalone Windows application in the Azure portal to obtain the necessary client IDs and authentication tokens.
Use the SDK's FileHandler class to load the encrypted Word document into your application.
Authenticate the user to verify their access rights against the Azure Rights Management Service. Once verified, call the decryption methods provided by the SDK to output a decrypted, standard OOXML DOCX file that your application can then parse normally.
Try WPS Office for Your Document Needs
If you are dealing with complex Microsoft Office restrictions and need a lightweight, highly compatible, and free alternative for daily document creation and editing, WPS Office is an excellent choice. It offers seamless migration and familiar interfaces without the heavy overhead.

Frequently Asked Questions
Why can't I unzip an RMS-encrypted Word document?
When a document is protected using Microsoft's RMS (Restrict Access), its internal OOXML structure is securely encrypted. Standard ZIP utilities cannot bypass this encryption to access the document contents.
Can I remove RMS protection without the Microsoft SDK?
No, you must authenticate with the Azure Rights Management service using authorized credentials to obtain the decryption key. There is no standard workaround for decrypting the file without proper authorization and APIs.
Where can I get support for Azure Information Protection APIs?
Microsoft provides dedicated support for developers working with these restricted files on the Microsoft Q&A forums, specifically under the Azure Information Protection tags.




