How to Configure Custom Sensitive Information Types for SSN in Microsoft 365
Question details
The user needs to optimize a custom sensitive information type to accurately detect Social Security numbers without triggering excessive false positives.

- Product
- Microsoft Purview / Office 365
- Device & OS
- not provided
- Scenario
- Configuring Data Loss Prevention (DLP) rules to detect custom or non-standard formats of U.S. Social Security Numbers (SSN) in documents and emails.
- Observed behavior
- The built-in detector misses certain SSN formats. Increasing the proximity setting captures more matches but can cause high false positive rates and processing overhead.
Ensure you have the necessary administrative privileges in the Microsoft Purview compliance portal to edit or create sensitive information types.
Optimize Proximity and Confidence Level Settings
Apply Microsoft's recommended limits to your proximity settings and adjust the confidence level to balance detection accuracy with system performance.
While testing might show that increasing the proximity limit beyond the default catches more matches, it also significantly increases false positives and server processing requirements. Microsoft officially recommends keeping the maximum proximity at 300 characters.
Log in to the Microsoft Purview compliance portal and navigate to 'Data classification', then select the 'Sensitive info types' tab.
Locate and select your custom U.S. SSN sensitive information type, then click 'Edit' to modify its matching parameters.
In the pattern configuration, set the proximity parameter (the maximum distance between the SSN pattern and corroborating evidence) to a maximum of 300 characters.
Configure the rule's confidence level to an appropriate range, commonly recommended between 55% and 85%, depending on how strict you want the detection to be.
Ensure the rule is set to require corroborating evidence (such as keywords like 'SSN' or 'Social Security') to trigger a valid match.

Try WPS Office for Secure Local Document Management
While enterprise-wide DLP rules require Microsoft Purview, WPS Office provides a highly secure, free, and lightweight alternative for everyday document editing. It features seamless format compatibility with Microsoft Office and includes robust built-in document encryption to help you protect sensitive data locally.
- 1. Download and Install: Download WPS Office for free from the official website and install it on your device.
- 2. Open Your Document: Launch WPS Office and open the document containing sensitive information that you want to secure.
- 3. Apply Password Protection: Go to the 'Menu', select 'Document Encryption', and set a strong password to restrict access to the file.

Frequently Asked Questions
What is the maximum recommended proximity for SSN detection in Microsoft 365?
Official Microsoft documentation recommends a maximum proximity value of 300 characters to effectively balance accurate detection with optimal processing performance.
Why does my DLP rule miss some Social Security numbers?
The built-in SSN detector may miss non-standard formats or numbers without standard separators. Creating a custom sensitive information type allows you to define specific regular expressions to catch these variations.
What confidence level should I set for a custom SSN sensitive information type?
A confidence level between 55% and 85% is commonly recommended. This ensures that only matches with sufficient corroborating evidence trigger alerts, significantly reducing the rate of false positives.




