Data Loss Prevention

To add onto my last blog about Security, I wanted to write about a new feature available with the on premise version of SharePoint 2016,  Data Loss Prevention.

Now I’m sure you have all heard of Data Loss Prevention within the compliance centre in office 365 – but I wanted to discuss what it is and how it works on premise.
This blog will demonstrate how DLP works, and how to set it up on SharePoint 2016.

What is Data Loss Prevention?
Put Simply, “Data Loss Prevention is a way to ensuring that sensitive data is protected against misuse or accidental disclosure”

How does SharePoint know what sensitive data is?
In SharePoint, sensitive information is defined by a pattern which is identified by a regular expression e.g. a bank number. The search engine contains several pre-defined keywords and checksums that are used to identify sensitive information alongside a confidence level process.

For example if a DLP has been configured where a UK Passport Number cannot be sent or seen within a corporate network, the following checks (table below) are checked against via the SharePoint search engine.

Format Nine digits
Pattern Nine consecutive digits
Checksum No
Definition A DLP policy is 75% confident that it’s detected this type of sensitive information if, within a proximity of 300 characters:

  • The function Func_usa_uk_passport finds content that matches the pattern.
  • A keyword from Keyword_passport is found.

Entity id=”178ec42a-18b4-47cc-85c7-d62c92fd67f8″ patternsProximity=”300″ recommendedConfidence=”75″>    <Pattern confidenceLevel=”75″>        <IdMatch idRef=”Func_usa_uk_passport” />        <Match idRef=”Keyword_passport” />    </Pattern></Entity>


Passport Number
Passport No
Passport #
Numéro de passeport
Passeport n °
Passeport Non
Passeport #
Passeportn °

If the document meets the criteria above, then the document will be flagged up and depending on the actions set, the document will be blocked.

Hope that has given you a good understanding of What DLP is, I now I will show you how to set this up in SharePoint 2016 in a few easy steps.

To set up DLP on SharePoint on-premise, there are a few pre-requisites that need to be setup prior.

  • SharePoint Server 2016
  • Search service application configured and running crawls.
  • Compliance Centre
  • eDiscovery Centre
  • Outgoing email with emails configured on users.

From within the eDiscovery site collection you have select ‘Create DLP Query’, as below

Then select New Item

From the New DLP Query pop up box, choose the template you wish to use, for example, for this demo, I will use the “UK Data Protection Act”.
Ensure you change the number at the bottom from 9 to 1 to ensure the rule works if 1 instance of the rule is found
Select Next

Give the Query a Name, and a start and end data and choose the source you want the DLP to work from.  (For this demo, I will leave the source as ‘Search Everything in SharePoint’), as below

Select Save.

That’s it, the DLP query has been created.

Now upload a document into SharePoint document library which contains nine consecutive numbers and a term from the Keyword, e.g below.

Save the document into SharePoint as Loreum ipsum.

loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum  789208725 passportno loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum loreum ipsum

run a search crawl, and select Search from the eDiscovery site collection, you should see the document appear (circled below)

So you can see that the document I uploaded which contained nine consecutive number and a term from the keywords has been flagged up via the eDiscovery Centre results section.

Now we need to create a Policy for this DLP.

Navigate to the Compliance Centre and select ‘Data Loss Prevention Policies’

6.ComplianceSelect New Item and select the a name  for the policy, select the template you chose above and edit the 9 to a 1 to change the number to 1 conflict before the rule to take effect. Insert an email address so that a when a DLP finds a match, it will email this person. And then choose what to do with the file once a match is find, i.e. show a policy tip and block document.  As below


Select Save.

After the Policy is created, we must assign that policy to a site collection. From the Compliance centre select DLP Policy Assignments for Site Collections


Select New Item and choose, First Choose a site Collection,


Select Save

Now under Managed Assigned Policy, assign your Policy to the site collection.


Select Save

Please note that when you add a New Policy Assignment, it may take 24 hours to apply, but High Priority rules such as Credit Cards and Passport numbers take up to 15 mins.


Policy Tips

In the Compliance Policy above, we ticked a box to say we wanted to enable Policy Tips and to block access to documents which meet the DLP policy rules, well this is what a Policy tips looks is and how it behaves in SharePoint once a rule has been met.

When a document in a library meets a Policy, a Policy tip is shown and the document is blocked, as below


The Policy tip displays an error on the document informing the user it is blocked (as we selected in the compliance centre).

The tip informs who the document is open to, the user the problems with the document.  The Owner, last modifier or the site owner can go into the document in remove the passport number, or if they think it’s an error, click resolve.


When you click resolve, you can override the policy, which means that you are aware and its normal that the data lives in the document. The other choice is Report an issue, where you think the document in fine and that it shouldn’t trigger a policy.


When you click on override, you must give a business justification as to why you want to override the rule, as below


The rule has been overwritten, and the error image is now been removed.


Leave a Reply

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