Microsoft Purview DLP Policies: From Simulation to Enforcement

How do you move a Purview DLP policy from simulation to blocking? Locations, sensitive information types for national ID numbers and IBANs, policy tips and tuning false matches.
Technical summary
Technology
Microsoft Purview DLP, Exchange Online, SharePoint Online, OneDrive, Microsoft Teams, Endpoint DLP, Security & Compliance PowerShell
Topic
Moving a DLP policy from simulation to enforcement in phases
Level
Intermediate–advanced
Prerequisites
  • A Microsoft 365 license that includes Purview DLP
  • The Compliance Administrator or DLP Administrator role
  • Sensitive data types and workflows identified
In this article8 sections

A Purview DLP policy is created in a few clicks. A policy turned on directly in blocking mode, however, stops accounting’s payroll send and HR’s correspondence with the insurance company on day one, and gets switched off the same week. After that, nobody dares turn it on again. This guide explains how to design a DLP policy across Exchange, SharePoint, OneDrive, Teams and endpoints, covering local data patterns such as national ID numbers and IBANs, simulation mode, override options and false positive tuning, with a phased enforcement plan.

What DLP prevents and what it can’t

In an enterprise cybersecurity program, DLP’s real job is to catch mistakes by well-meaning users: sending the customer list to a personal address, sharing a file containing ID numbers with “anyone with the link”, pasting a card number into a Teams chat. A policy tip informs the user at the moment of the action and changes behavior. Most breaches aren’t malicious; they’re careless.

Know its limits from the start too:

  • It doesn’t stop a determined insider from taking a screenshot or retyping the content by hand.
  • It can’t inspect the contents of password-encrypted archives and files; to catch such attachments separately, the password-protected document condition (-DocumentIsPasswordProtected) can be used in rules.
  • It inspects text inside images only if the relevant scanning feature is configured.
  • It doesn’t see channels left out of the policy scope (unmanaged devices, personal cloud apps) on its own.

That’s why DLP is handled together with access control, sharing settings and data reduction work. A policy written without knowing where sensitive data accumulates protects the easiest channel to configure, not the most used one. For data on file servers, see the sensitive data discovery guide. Before creating a DLP rule, determine which data is used in which process through an IT asset inventory and data classification project.

Locations: email, SharePoint, Teams, endpoints

The action DLP can apply differs in each location within Microsoft 365 security. Before setting up the policy, write down location by location which data movement you want to stop; a rule that isn’t clear on paper won’t be clear in the portal either.

You are here Typical action Watch out for
Exchange email Blocking sending outside, encryption, tip Exceptions for partner domains
SharePoint sites Restricting external user access Existing shares are assessed too
OneDrive accounts Restricting external sharing and anonymous links Scope can be user- or group-based
Teams chats and channels Blocking the message Files shared in Teams live in SharePoint/OneDrive
Devices (Endpoint DLP) Copying to USB, printing, uploading to unsanctioned cloud Devices must be onboarded to Purview

A file shared in a Teams chat lives in the sender’s OneDrive, and a channel file in the team’s SharePoint site. File content is protected by the policies for those locations; selecting only the Teams location and assuming the files are protected too is a common mistake. Tenant and site settings that limit external sharing are a prerequisite for DLP; details are in the SharePoint and OneDrive external sharing security guide.

Sensitive information types and custom patterns

A sensitive information type (SIT) consists of a pattern, an optional validation function, supporting keywords looked for nearby, and a confidence level. Purview has built-in types for credit card numbers, IBANs and the Türkiye national identification number. Check in the current product documentation whether a type is built-in or custom and which DLP locations it can be used in, and check its exact name in your tenant:

Connect-IPPSSession
Get-DlpSensitiveInformationType | Where-Object { $_.Name -match "Turk|IBAN|Credit" } |
  Select-Object Name, Id, Publisher

A pattern based only on a regular expression produces false positives. Not every 11-digit number is a national ID number; order numbers, phone numbers and serial numbers match too. That’s why the ID number’s checksum rule matters: the first digit can’t be 0; the 10th digit is the value obtained by subtracting the sum of the four even-position digits from 7 times the sum of the first five odd-position digits, modulo 10; and the 11th digit is the sum of the first 10 digits modulo 10. Credit card numbers are validated with the Luhn algorithm. Built-in types include these validations. Try them before writing your own regular expression.

Custom SITs are defined for organization-specific data: employee ID numbers, project codes, contract numbers. In a good custom SIT:

  • The pattern is kept as narrow as possible (for example, a structure with a fixed prefix such as PRJ-[0-9]{5}).
  • The high confidence level is tied to a supporting keyword such as “employee ID” or “staff no” appearing near the pattern.
  • It’s validated with test files, without using real data.

If matching against real values in the customer database is needed, exact data match (EDM) can be considered instead of a pattern. EDM catches only values in the organization’s real records and noticeably lowers false positives; in return, it requires a data upload and update process.

Starting in simulation mode

Every new policy starts in simulation. No exceptions. In the Purview portal, simulation is selected when creating the policy; in PowerShell, the equivalent is the Mode parameter. The example below targets content shared externally that contains at least 10 national ID numbers with high confidence; replace the SIT name with the name from the previous command’s output:

New-DlpCompliancePolicy -Name "TR Personal Data - External Transfer" `
  -ExchangeLocation All -SharePointLocation All -OneDriveLocation All -TeamsLocation All `
  -Mode TestWithoutNotifications

New-DlpComplianceRule -Name "National ID high volume - external" -Policy "TR Personal Data - External Transfer" `
  -ContentContainsSensitiveInformation @{Name="<SIT name in tenant>"; minCount="10"; confidencelevel="High"} `
  -AccessScope NotInOrganization -BlockAccess $true `
  -NotifyUser Owner -NotifyAllowOverride WithJustification `
  -ReportSeverityLevel High

In TestWithoutNotifications mode, no action is applied and nothing is shown to the user; matches appear in the simulation results and in Activity explorer. The answers sought at this stage: Which department sends sensitive data, through which channel, to whom and how often? Which matches are legitimate workflows, which are real risks, which are false positives? A team that moves to the next stage without answering these questions ends up answering the same questions on the phone in blocking mode.

Policy tips and overrides

The second stage of simulation is TestWithNotifications mode: the user sees the policy tip in Outlook, SharePoint or OneDrive, but the operation isn’t blocked. This stage both gets users used to it and brings out false positives through “why did this warning appear?” questions. The tip text is written in the organization’s voice, short and action-oriented: what data was detected, why it’s a risk, what the right channel is. Nobody reads long legal text.

When moving to enforcement, overrides can be used in three ways:

Option Behavior When it fits
No override The operation is blocked directly Data with no exceptions, such as card data
Override with justification The user continues by writing a business justification Transition period, data with legitimate flows
False positive report The user reports that the match is wrong Rules whose patterns are still being tuned

Justifications are written to the audit log. In the weekly review, flows that recur with the same justification (for example, the employee list sent to the same insurance company every month) are identified, and a safer channel or a rule exception is defined for that flow. Encryption options suited to these flows are compared in the email encryption options article.

Tuning false positives

The remedy for a false positive isn’t to switch off the rule but to narrow the condition. Tuning methods that work:

  • Instance count threshold: An email containing a single ID number and a table containing 200 aren’t the same risk. Write a tip-only rule for low volume and a blocking rule for high volume.
  • Confidence level: Tie blocking rules to the high confidence level; use medium confidence only for monitoring.
  • Recipient and location exceptions: Add approved recipients, such as the domain of a contracted payroll service provider, as exceptions; document the exceptions and review them periodically.
  • Label condition: If labels are used, target content labeled “Confidential – Personal Data” separately; the labeling infrastructure is covered in the sensitivity label design guide.
  • Improving custom SITs: Add supporting keywords and a proximity requirement, and make the pattern’s boundaries clearer.

Moving to enforcement and incident review

Enforcement progresses by measurable criteria, not by calendar. An example phase plan:

Stage Mode Exit criterion
1. Observation Simulation without notifications Legitimate flows identified and approved by their owners
2. Awareness Simulation with tips False positive reports have been tuned
3. Soft enforcement Enabled, override with justification Justifications reviewed, exceptions defined
4. Full enforcement Enabled, direct blocking at high volume The incident review process is working

To enable the policy:

Set-DlpCompliancePolicy -Identity "TR Personal Data - External Transfer" -Mode Enable

The value of enforcement shows up in incident review. DLP alerts can be viewed in the Purview portal and in the Microsoft Defender XDR incident queue. For the review process, these are written down in advance: who reviews the alert and how quickly; how the user is contacted; at what point a repeated violation goes to HR or legal; who can see the sensitive data in the alert content. Keep alert severity levels at a volume the team can really review. Hundreds of unreviewed alerts aren’t better than no alerts at all. They’re just noisier.

How DLP maps to technical measures under KVKK is explained in the implementing KVKK technical measures guide. The reference for Purview’s conceptual framework is Microsoft’s data loss prevention documentation. For policy design, simulation analysis and setting up the incident review process, see the data loss prevention and DLP service.

Frequently asked questions

Are sensitivity labels a prerequisite for Purview DLP?

No. DLP policies can work with sensitive information types alone, that is, patterns in the content. If labels are used, they’re added as a condition and make the policy more accurate; but you can start your first DLP policies in simulation without waiting for the labeling infrastructure.

Are users affected in simulation mode?

In simulation without notifications, no action is applied and the user sees nothing; only matches are reported. In simulation with policy tips, the user sees the warning, but the operation still isn’t blocked. This second stage is used to see user behavior and feedback.

Can DLP inspect password-protected ZIPs or encrypted files?

The contents of password-encrypted archives can’t be inspected. Policy design should address encrypted and uninspectable files with a separate condition or rule, and at least monitor sending them outside. Content protected with Microsoft’s own encryption is a different case; verify the supported scenarios in the current documentation.

Doesn’t the user override option weaken security?

An override that requires a justification and is written to the audit log lets you collect data during the transition without stopping legitimate workflows. Justifications are reviewed regularly; recurring legitimate flows are added to the policy as exceptions, and for rules where abuse is seen, the override is removed and the rule moves to direct blocking.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles