Data Protection Issues

Troubleshoot False Positives in Microsoft Purview Sensitive Information Type Rules

Aamir Naveed AkramAamir Naveed Akram Nov 22, 2026 869 views

Question details

Determine why a custom sensitive information type produces false positives despite a keyword intended to prevent matches.

Troubleshoot False Positives in Microsoft Purview Sensitive Information Type Rules
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.
Before you start

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.

Solution 1Recommended

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.

1
Inspect the XML

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.

2
Check the file encoding

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.

3
Test the original template

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.

4
Reintroduce changes and test

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.

Validate the XML and test the Microsoft template
Check import errors separately: If New-DlpSensitiveInformationTypeRulePackage returns an error, capture the full message. An import error and an unexpected match after a successful import require different investigation.
Free Microsoft Office alternative

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.

Open and edit common Microsoft Word, Excel, and PowerPoint formatsUse familiar document, spreadsheet, and presentation toolsReview document content that may be used as a sample when investigating sensitive information matchesMove existing Office files into a lightweight workspace
microsoft office alternative - wps office

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.