Cognni InsightsBook a Demo
Guide

How do I auto-label files for Microsoft Purview DLP?

By Guy Eisdorfer · Updated

Short answerPurview can auto-label files using sensitive information types, keywords and trainable classifiers, which works for content with a pattern to match. To label business documents with no pattern, such as board material, contracts and R&D, classify files by meaning and write the labels into Purview. Then point your DLP policies at those labels. Start in simulation, check the results on files you know, and switch to enforcement once the labels are accurate.

Why DLP needs labels

Purview DLP can inspect content directly, but it's far more reliable when it acts on sensitivity labels. A label carries a decision about the file, so DLP, encryption, Copilot policy and Insider Risk can all act on the same answer. When most files are unlabeled, those policies have nothing dependable to work with.

How Purview auto-labeling works today

Purview offers two built-in routes:

  • Client-side auto-labeling recommends or applies a label in Office apps when a user edits a file that matches a condition.
  • Service-side auto-labeling applies labels to files at rest in SharePoint and OneDrive, and to email in transit, based on conditions you define.

Both rely on the same detection: sensitive information types, keywords, exact data match and trainable classifiers. That works for structured identifiers. It doesn't work for documents whose sensitivity comes from what they are, which is why coverage stays low for board material, deal documents, legal opinions and R&D.

How to auto-label files for DLP, step by step

  1. Define the labels DLP will use. Keep the taxonomy small, and decide what each label should trigger.
  2. Classify files by meaning. Identify what each document is, so files with no identifiers are found too.
  3. Map classifications to labels. For example, board packs and unreleased results to Highly Confidential, Board and Finance; supplier contracts to Confidential.
  4. Write the labels into Purview. Apply them to the original files so they travel with the content.
  5. Point DLP at the labels. Create or update DLP policies that act on the label, such as blocking external sharing of Highly Confidential files.
  6. Run in simulation first. Check matches against files you already know, then move to enforcement.
  7. Keep labeling continuously. Label new and changed files as they arrive.

Common mistakes

  • Labeling only what a pattern can find. Coverage looks good on paper while the most sensitive documents stay unlabeled.
  • Labels too broad to act on. "Internal" or "Compliance" doesn't tell a DLP policy what to do.
  • Enforcing on noisy matches. Policies that fire on templates and test data get switched back to audit mode.
  • Treating it as a one-off. Labeling has to run continuously as new files arrive.

Where Cognni fits

Cognni classifies files by meaning, with more than 400 information types and no rules to write, and writes your own sensitivity labels onto the original files in Microsoft 365. Your existing Purview DLP, Copilot and Insider Risk policies then act on those labels, with up to 80% fewer false positives once policy acts on context. Connecting is agentless and read-only through Microsoft Graph; writing labels needs separate write consent.

Frequently asked questions

Can Purview auto-label files without any other tool?

Yes, for files that match sensitive information types, keywords or trained classifiers. Files with no matching pattern usually stay unlabeled.

Will auto-labeling overwrite labels users applied?

It depends on the label priority and your settings. Plan how automatic labels interact with manual ones before you turn enforcement on.

Do we need to change our DLP policies?

Usually only to point them at labels, if they don't already. The policies themselves stay in Purview.

How do we check the labels are right?

Run in simulation, then review a sample of files whose sensitivity you already know before switching to enforcement.

See it on your own data

Cognni shows which sensitive files your people and AI tools can reach, and what to fix first.

Book a Demo