How to set up Data Loss Prevention rules in Google Drive

Problem

How can you scan all files inside all Shared Drives and find out if the users have been saving the Sweden Personal Identity Number (personnummer). 

Note: This article can be used to look for any other pre-defined data type.

Environment

  • Drive
  • Google Workspace Enterprise subscriptions

Solution

  1. Open the Admin console.
  2. On the left side menu, click Rules.
  3. Click Create rule > Data protection.
  4. Enter a name and a description of the rule. 
  5. Select the scope of the rule.
  6. Click Continue
  7. Under Google Drive select File created, modified, uploaded or shared. 
  8. Click Continue.
  9. To add a condition to match, click Conditions ADD CONDITION.
  10. On Content type to scan, set it to All content
  11. On What to scan for, select Matches predefined data type (recommended)
  12. Click Select data type, and look for the data type that you want to look for.
  13. Click Likelihood Threshold and select the option that you prefer. 
  14. Click Continue.
  15. Under Actions, select the action that you want Google Drive to take if a match is found. 
  16. Select the severity of the rule under Alerting.
  17. Click Continue
  18. Click Create