Troubleshoot False Positives in Microsoft Purview Sensitive Information Type Rules
Question details
Determine why a custom sensitive information type produces false positives despite a keyword intended to prevent matches.

- Product
- Microsoft Purview Data Loss Prevention
- Device & OS
- not provided
- Scenario
- A custom XML rule uses Entity, IdMatch, and an Any element with zero minimum and maximum matches to control sensitive information detection.
- Observed behavior
- The rule appears to work for some users but not others, and unexpected policy tips identify content as sensitive information.
Gather the custom XML file, the exact import error if one occurs, and sample text that produces an unexpected match. Confirm that you have the permissions needed to manage sensitive information types and DLP policies.
Validate the XML and test the Microsoft template
Use this approach to determine whether the issue comes from the custom XML or the rule package import.
Open the rule package in an XML editor and check that the Entity, IdMatch, Any, and keyword references follow the Microsoft template and schema. Verify the intended effect of the zero minimum and maximum match values rather than assuming they exclude the keyword.
Use the editor's Save As or encoding options to save the file as XML with an encoding consistent with its XML declaration and Microsoft's rule package requirements. Check for an accidental .txt extension.
In a test environment, try importing an unmodified Microsoft template with New-DlpSensitiveInformationTypeRulePackage in Security & Compliance PowerShell. If the template imports successfully, compare it with the custom file; address any identifier conflicts before importing.
Add the custom rule changes incrementally, then use the sensitive information type test option in the Microsoft Purview portal with sample content that should and should not match. Record which change first produces an unexpected result.

Compare DLP policy tips for affected users
Use this approach when the rule imports but policy tips appear inconsistently or unexpectedly.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files and moving existing documents into a new workflow. It does not configure or repair Microsoft Purview DLP rules.

Frequently Asked Questions
Does an Any element with zero minimum and maximum matches automatically exclude a keyword?
Do not assume it does. Compare the element and its placement with Microsoft's sensitive information type schema and template, then test sample content with and without the keyword in the Purview portal.
How can I tell whether the XML file is causing an import error?
Try New-DlpSensitiveInformationTypeRulePackage with an unmodified Microsoft template in a test environment. If it succeeds, compare the custom file's structure, identifiers, encoding, and XML declaration with the template.
Why might only some users see a policy tip?
DLP policy scope, exclusions, locations, rule conditions, and propagation can differ. Open the policy in the Microsoft Purview portal and compare its settings and the test content for affected and unaffected users.
Can another rule cause the unexpected policy tip?
Yes. Review the applicable DLP policies and their sensitive information type conditions in the Purview portal, along with available DLP activity details, to identify which rule matched the content.




