Microsoft Purview icon

DLP & Compliance in Microsoft 365: Complete Administration Guide

📄 Article

DLP & Compliance in Microsoft 365: Complete Administration Guide

Data Loss Prevention (DLP) and Microsoft Purview compliance features protect your organisation’s sensitive information from accidental or intentional leakage. Every Microsoft 365 administrator interview touches on DLP policies, Sensitive Information Types, and sensitivity labels — this guide covers all of it with practical configuration steps.

🛡️ What is DLP?

💡 Overview

Data Loss Prevention (DLP) in Microsoft Purview identifies, monitors, and automatically protects sensitive information across Exchange Online, SharePoint, OneDrive, Teams, and endpoints. A DLP policy detects content that matches defined conditions — such as credit card numbers or personal identifiers — and applies actions like blocking sharing, showing policy tips, or notifying admins.

⚙️ Creating a DLP Policy

1

Choose Locations and Template

Go to Microsoft Purview portal → Data Loss Prevention → Policies → Create policy. Select a template (e.g. Financial, Privacy) or start with a custom policy, then choose the locations to protect (Exchange, SharePoint, OneDrive, Teams, Devices).

2

Define Conditions and Actions

Add conditions using Sensitive Information Types or sensitivity labels, set the instance count and confidence level, then define actions — restrict access, encrypt, block external sharing — plus user notifications and incident reports.

3

Test Before Enforcing

Always run the policy in simulation mode first to review what would be flagged, then turn it on once you’re confident there are no false positives disrupting business workflows.

🔢 Blocking Random Numbers with a Custom SIT

⚠️ Common Interview Scenario

“Create a DLP policy to block emails containing random numbers (e.g. account numbers with a specific pattern).” Built-in SITs won’t match a custom pattern — you need a Custom Sensitive Information Type (Custom SIT) built with a regular expression, then reference it in the DLP policy.

PowerShell — Security & Compliance

Connect-IPPSSession

# Verify existing sensitive information types:
Get-DlpSensitiveInformationType | Select-Object Name, Publisher

# Create a DLP compliance policy
New-DlpCompliancePolicy -Name "Block Account Numbers" -ExchangeLocation All -Mode Enable

# Add a rule that blocks messages containing the custom SIT
New-DlpComplianceRule -Name "Block Account Number Rule" -Policy "Block Account Numbers" -ContentContainsSensitiveInformation @{Name="Custom Account Number"} -BlockAccess $true

🔍 Sensitive Information Types (SIT) vs Custom SIT

Type What It Is When Used
Built-in SIT 300+ Microsoft-defined patterns (credit cards, SSN, passport numbers, IBAN) Standard regulated data — fastest to deploy
Custom SIT Your own pattern built from regex, keyword lists, and confidence levels Organisation-specific data — employee IDs, project codes, account numbers
Exact Data Match (EDM) Matches against an uploaded hashed table of actual sensitive values Very high accuracy needs — near-zero false positives

🏷️ Sensitivity Labels & Microsoft Information Protection (MIP)

💡 MIP Overview

Microsoft Information Protection (now Microsoft Purview Information Protection) is the framework for classifying and protecting data using sensitivity labels. Labels travel with the file or email, applying encryption, watermarks, and access restrictions wherever the content goes.

Typical Label Behaviour

Label Typical Behaviour
Public No protection — content approved for external release
Internal Visible marking (header/footer); sharing intended for employees only
Confidential Encryption applied; access restricted to authenticated internal users; external forwarding blocked

Auto-Labeling

✅ Two Types of Auto-Labeling

  • Client-side auto-labeling: Applied while the user works in Office apps — recommends or applies a label when sensitive content is detected
  • Service-side auto-labeling: Applied automatically to content at rest in SharePoint/OneDrive and emails in transit — no user interaction required

🔒 Encryption at Rest and in Transit

💡 How Microsoft 365 Encrypts Data

  • Data in transit: Protected using TLS 1.2+ between clients, servers, and datacenters — this covers Outlook-to-Exchange Online, browser-to-SharePoint, and datacenter-to-datacenter traffic
  • Data at rest: Protected using BitLocker and distributed key management (DKM) at the disk level, plus per-file encryption in SharePoint/OneDrive where each file is encrypted with its own key
  • Service encryption: An additional layer using Microsoft-managed keys by default, upgradable to Customer Key for organisations that need to control and revoke their own encryption keys
  • Message-level encryption: Microsoft Purview Message Encryption adds email-specific encryption controlled by sensitivity labels, independent of transport-level TLS

📧 Blocking External Email with a Transport Rule

PowerShell — Exchange Online

Connect-ExchangeOnline

# Block emails with the Confidential label from going to external recipients
New-TransportRule -Name "Block Confidential External" `
  -MessageContainsDataClassifications @{Name="Confidential"} `
  -SentToScope NotInOrganization `
  -RejectMessageReasonText "Confidential content cannot be sent externally."

📊 PII Dashboard in Microsoft Purview

💡 Where to Find It

In the Microsoft Purview portal, use Data Classification → Content Explorer to see exactly which files and emails contain PII across the organisation, and Activity Explorer to track label changes and DLP policy matches over time. These dashboards require the Content Explorer Content Viewer / List Viewer role groups.

💡 Best Practices & Recommendations

  • Always start DLP policies in simulation mode and review matches before enforcing
  • Use policy tips to educate users at the moment of violation instead of silently blocking
  • Keep the number of top-level sensitivity labels small (3–5) so users can choose correctly
  • Combine DLP with auto-labeling so protection doesn’t depend on user discipline
  • Review DLP reports and Activity Explorer weekly to tune false positives
  • Document every custom SIT regex and test it against real sample data before production

🎓 Common Interview Questions

Q: What is a DLP policy and have you configured one? Walk me through it.
A DLP policy monitors and protects sensitive data across M365 workloads. Configuration: in Purview → DLP → Create policy, choose a template or custom policy, select locations (Exchange, SharePoint, OneDrive, Teams, Devices), define conditions using Sensitive Information Types with instance count and confidence level, set actions (block, restrict, notify), configure policy tips and incident reports, then test in simulation mode before turning on.

Q: How would you create a DLP policy to block random numbers like internal account numbers?
Built-in SITs won’t match a custom pattern, so first create a Custom Sensitive Information Type with a regular expression describing the number format (plus supporting keywords and proximity for confidence). Then create a DLP policy whose rule uses that Custom SIT as the condition, and set the action to block access or block the email. This same Custom SIT concept answers “what is a Custom Sensitive Information Type and when would you use it” — it’s used whenever your organisation has proprietary data patterns (account numbers, employee IDs, project codes) that built-in types don’t cover.

Q: What is the difference between Internal, Confidential, and Public sensitivity labels?
These are classification levels applied via sensitivity labels. Public means approved for anyone, no protection applied. Internal adds visual markings and signals employee-only content but typically no encryption. Confidential applies encryption and access restrictions so only authorised internal users can open it — even if the file leaves the organisation, the protection travels with it.

Q: How does encryption work for data at rest and data in transit in Microsoft 365?
Data in transit is protected with TLS 1.2+ across all client-to-server and server-to-server connections (Outlook, browsers, datacenter replication). Data at rest is protected with BitLocker disk-level encryption plus per-file encryption in SharePoint/OneDrive, each file having its own unique key. On top of this, service encryption uses Microsoft-managed keys by default, with the option to upgrade to Customer Key for organisations needing to manage and revoke their own keys. Sensitive emails can additionally get message-level encryption via Purview Message Encryption, independent of transport TLS.

Q: How would you block emails to external users using sensitivity labels?
Create an Exchange transport rule (mail flow rule) with the condition “message contains data classification / sensitivity label = Confidential” and the condition “recipient is located outside the organisation”, with the action to reject the message with an explanation. Alternatively, configure the label’s encryption settings so external users are simply not granted rights.

Q: Where can you view PII dashboards in the Microsoft Purview portal?
Under Data Classification: Content Explorer shows which items across Exchange, SharePoint, and OneDrive contain PII and other sensitive info types, while Activity Explorer shows label and DLP activity over time. Access requires the Content Explorer Content Viewer or List Viewer role groups.

📚 References & Further Reading

Leave a Comment

Your email address will not be published. Required fields are marked *