How to Fix Encryption Format Not Enabled for AIP Files in C#
Question details
The user needs to resolve an error preventing a C# application from re-encrypting certain Azure Information Protection files.

- Product
- Azure Information Protection / MIP SDK
- Device & OS
- not provided
- Scenario
- A developer is using the Microsoft.InformationProtection.File library in a C# application to process and re-encrypt files in multiple AIP formats.
- Observed behavior
- The application throws an "Encryption format not enabled to this file type" error because different SDK library versions have varying support for specific protected file formats.
Verify the exact version of the Microsoft Information Protection (MIP) SDK your C# application is currently using and identify the specific file extensions triggering the error.
Update the MIP SDK and Verify Supported Formats
Check your current SDK version against Microsoft's documentation and update to the latest release to ensure maximum compatibility with newer AIP formats.
Different versions of the Microsoft Information Protection SDK support different encryption formats. If you are dealing with a mix of older and newer AIP-protected files, an outdated SDK may fail to recognize specific formats, resulting in the "Encryption format not enabled" error.
Navigate to the official Microsoft Information Protection SDK documentation online and review the "Supported file types" section for your specific SDK version.
Open your project in Visual Studio, go to the NuGet Package Manager, and update the 'Microsoft.InformationProtection.File' library to the latest stable release.
Review the latest Microsoft C# code samples for file encryption and adjust your implementation to match any newly introduced API patterns.
Run your application in a testing environment using the specific file types that previously threw the encryption error.

Seek Support in the Microsoft Forums
If updating the SDK and using official samples does not resolve the issue, consult the Microsoft Q&A forums with your specific configuration details.
Manage and Secure Your Daily Documents with WPS Office
While resolving complex Azure Information Protection SDK errors requires development troubleshooting, managing and protecting your standard office documents shouldn't be a hassle. WPS Office provides a robust, lightweight, and free alternative to Microsoft Office, complete with built-in document encryption and permission management features.
- 1. Open Your Document: Launch WPS Office and open the document, spreadsheet, or presentation you want to secure.
- 2. Access Encryption Settings: Go to the 'Menu' at the top left, select 'Document Encryption', and then click on 'Encryption'.
- 3. Set a Password: Enter a strong password for opening or modifying the file, confirm it, and click 'OK' to protect your document.

Frequently Asked Questions
Why does my C# app throw the 'Encryption format not enabled to this file type' error?
This error occurs when the Microsoft.InformationProtection.File library encounters a file type or encryption format that it does not support. This is usually caused by using an outdated SDK version that lacks support for newer Azure Information Protection formats.
How can I find out which file types are supported by the MIP SDK?
You can verify supported formats by visiting the official Microsoft Information Protection SDK documentation and checking the 'Supported file types' page, which details compatibility based on the SDK version and file extension.
Will updating the Microsoft.InformationProtection library fix my encryption issue?
In many cases, yes. Microsoft frequently updates the SDK to support new file types and fix compatibility bugs. Updating your NuGet package to the latest version and aligning your code with current official samples is the best first step.




