This document describes the two-stage process for importing Microsoft Purview DLP compliance rules into eSHARE so they can be associated with DLP Tags. The following steps will be reviewed:
REQUIREMENT:
Part 1 requires a Microsoft 365 account with the Global Administrator or Compliance Administrator role. Part 2 requires an eSHARE Administrator role.
Note:
DLP rules that are already present in eSHARE do not need to be re-imported. Only run this procedure when new rules have been created in Microsoft Purview and need to be made available in eSHARE.
Part 1: Extracting DLP Rules via PowerShell
Use the Security & Compliance PowerShell module to retrieve all DLP compliance rules configured in your Microsoft 365 tenant. The output will be saved as a plain-text file and used in Part 2 to import the rules into eSHARE.
Prerequisites
The ExchangeOnlineManagement PowerShell module (version 3.0 or later) must be installed on your machine.
Your Microsoft 365 account must have the Global Administrator or Compliance Administrator role.
PowerShell 5.1 or PowerShell 7+ is required.
Step 1 — Open a PowerShell Session
Launch Windows PowerShell or PowerShell 7 as an administrator on your local machine.
Step 2 — Connect to the Security & Compliance Endpoint
Run the following command to authenticate and connect to your tenant's Security & Compliance PowerShell endpoint:
Connect-IPPSSessionA browser window or credential prompt will appear. Sign in with your Microsoft 365 administrator account. Once authenticated, the session will be established and the prompt will return.
Step 3 — Retrieve All DLP Compliance Rules
Run the following command to display all DLP compliance rules configured in your tenant:
Get-DlpComplianceRule | Format-ListThis returns the full details of each DLP rule in list format, including rule names, conditions, actions, and parent policy information.
Step 4 — Save the Output to a Text File
Copy the full output from the PowerShell window and paste it into a plain-text file (e.g. Notepad), then save the file with a
.txtextension — for example:dlp_rules_export.txt.Alternatively, redirect the output directly to a file by running:
Get-DlpComplianceRule | Format-List | Out-File -FilePath ".\dlp_rules_export.txt" -Encoding UTF8Keep this file accessible — it will be uploaded into eSHARE in Part 2.
Important:
Do not modify the contents of the exported text file. eSHARE parses the raw PowerShell output to identify rule definitions. Editing the file may cause rules to fail import or be imported incorrectly.
Part 2: Importing DLP Rules into eSHARE
Once you have the exported .txt file from Part 1, navigate to the eSHARE Admin Console to import the rules.
Step 5 — Open the Admin Console
Sign in to the eSHARE Admin Console and navigate to the 'Sensitivity Labels & DLP Tags' section from the Admin Console navigation menu.
Step 6 — Open DLP Tag Settings
Click the 'DLP Tag Settings' button located in the upper-right area of the Sensitivity Labels & DLP Tags page.
A menu will appear with two options: 'Add Tag' and 'Add Rules'.
.png?sv=2026-02-06&spr=https&st=2026-10-01T06%3A43%3A06Z&se=2026-10-01T06%3A56%3A06Z&sr=c&sp=r&sig=jfXNNZXBjGSx8ZZvJXxT%2BpXQqTrPnnYCSC7qDLxyu7c%3D)
Step 7 — Select Add Rules
Click 'Add Rules'. A file upload dialog will appear.
.png?sv=2026-02-06&spr=https&st=2026-10-01T06%3A43%3A06Z&se=2026-10-01T06%3A56%3A06Z&sr=c&sp=r&sig=jfXNNZXBjGSx8ZZvJXxT%2BpXQqTrPnnYCSC7qDLxyu7c%3D)
Step 8 — Upload the Exported Text File
Select the
.txtfile you exported in Part 1 (e.g.dlp_rules_export.txt) and confirm the upload.
eSHARE will parse the file and import any new DLP rules found within it.
Step 9 — Verify the Imported Rules
After the import completes, review the DLP rules available in eSHARE. The newly imported rules will be available for selection when creating or editing a DLP Tag via the 'Add Tag' option.
Note:
Importing rules does not automatically create DLP Tags or associate rules with a Sharing Policy. After importing, use the 'Add Tag' option to create a DLP Tag that references the imported rules and assign it to the appropriate Sharing Policy.