logo
search
Data Protection Issues

How to Fix Microsoft Purview DLP Not Detecting South African ID Numbers

Maira MehtabMaira Mehtab Sep 27, 2026 869 views

Question details

The user needs to resolve an issue where a custom Sensitive Information Type (SIT) and regular expression fail to detect South African identity numbers in Microsoft Purview Data Loss Prevention policies.

Product
Microsoft Purview
Device & OS
not provided
Scenario
Configuring enterprise DLP policies to monitor and protect sensitive regional data, specifically South African identity numbers.
Observed behavior
The configured custom Sensitive Information Type and regular expression fail to trigger data loss prevention detections for the targeted ID numbers.
Before you start

Ensure you have administrative access to the Microsoft Purview compliance portal and prepare a set of sanitized, mathematically valid synthetic South African ID numbers for safe testing.

Solution 1Recommended

Review Regex and Sensitive Information Type Configuration

Verify your regular expressions, validation logic, and confidence levels to ensure the DLP policy accurately matches the target data without overly strict constraints.

South African ID numbers have a specific 13-digit format that includes the date of birth, gender, citizenship status, and a checksum. If your regex is too broad or your validation logic fails the checksum (Luhn algorithm), the Microsoft Purview engine will not trigger the detection.

1
Access the Compliance Portal

Log in to the Microsoft Purview compliance portal using your administrative credentials and navigate to the 'Data classification' tab in the left-hand menu.

2
Locate the Custom SIT

Click on 'Classifiers' and select the 'Sensitive info types' tab. Search for and open your custom Sensitive Information Type for South African IDs.

3
Edit the Regex Pattern

Click 'Edit' on the pattern and carefully review the regular expression. Ensure it accurately targets a 13-digit sequence (e.g., using word boundaries like \b\d{13}\b) and accounts for the specific sequence logic.

4
Adjust Confidence Levels

Check the 'Confidence level' settings. If it is set to 'High', the policy might be too strict. Try temporarily adjusting it to 'Medium' or 'Low' to see if detections begin to trigger.

5
Test with Sanitized Data

Use the built-in testing tool within the SIT configuration page. Input sanitized, fake ID numbers that pass standard validation logic to confirm the rule fires properly.

Security Warning: Never use real, live identity numbers when testing DLP policies. Always generate synthetic test data that conforms to the mathematical validation rules to prevent accidental data leaks.
Free Microsoft Office alternative

Try WPS Office for Secure Everyday Document Management

While configuring complex enterprise DLP policies requires Microsoft Purview, WPS Office provides a lightweight, highly compatible alternative for everyday document creation and data management. Enjoy a familiar interface and seamless formatting across all your essential files without the heavy subscription costs.

  1. 1. Download the Software: Visit the official WPS Office website and click the 'Download WPS Office Free' button for your operating system.
  2. 2. Install WPS Office: Run the downloaded installation file and follow the simple on-screen instructions to set up the software.
  3. 3. Secure Your Documents: Open your existing Microsoft Office files in WPS Office and use the built-in 'Encrypt' feature under the Menu to apply password protection to sensitive data.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Built-in document encryption and password protection to keep your sensitive local files secure.Lightweight installation and incredibly fast performance on Windows, Mac, and Linux.A cost-effective, free alternative to Microsoft Office featuring a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my custom Sensitive Information Type in Purview not detecting anything?

This commonly occurs if there are syntax errors in the regular expression, the confidence level is set too high for the provided pattern, or the test data fails the mathematical validation logic (such as a checksum) required by the Sensitive Information Type.

What is the standard regex format for a South African ID number?

A South African ID is a 13-digit number. While a basic regex like \b\d{13}\b identifies a 13-digit sequence, a robust implementation for DLP usually requires additional validation logic, such as the Luhn algorithm, to ensure the digits represent a mathematically valid ID.

Can I use real ID numbers to test my Purview DLP policies?

No. For compliance and security reasons, you should never use real personally identifiable information (PII) for testing. Instead, utilize mathematically valid synthetic ID numbers that pass the necessary algorithm checks without exposing real user data.