--- title: "Importing DLP Rules into eShare" slug: "importing-dlp-rules-into-eshare" description: "Import Microsoft Purview DLP rules into eSHARE using PowerShell, then associate them with DLP Tags and Sharing Policies." tags: ["DLP Tags", "DLP Compliance Rules", "Microsoft Purview", "eSHARE Import Process"] updated: 2026-10-21T16:41:46Z published: 2026-10-21T16:41:46Z canonical: "docs.eshare.com/importing-dlp-rules-into-eshare" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.eshare.com/llms.txt > Use this file to discover all available pages before exploring further. # Importing DLP Rules into eShare 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: - [Extract DLP Rules via PowerShell](/collaborate/docs/importing-dlp-rules-into-eshare#extract-dlp-rules-via-powershell) - [Import DLP Rules into eSHARE](/collaborate/docs/importing-dlp-rules-into-eshare#import-dlp-rules-into-eshare) > **PREREQUISITES:** > > - Extracting the rules via PowerShell requires a Microsoft 365 account with the Global Administrator or Compliance Administrator role. Importing them into eSHARE requires an eSHARE Administrator role. > - The ExchangeOnlineManagement PowerShell module (version 3.0 or later) must be installed on your machine. > - PowerShell 5.1 or PowerShell 7+ is required. > [!WARNING] > 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. ### **Extract 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 the next section to import the rules into eSHARE. 1. Launch Windows PowerShell or PowerShell 7 as an administrator on your local machine. 2. Run the following command to authenticate and connect to your tenant's Security & Compliance PowerShell endpoint: ```powershell Connect-IPPSSession ``` A 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. 1. Run the following command to display all DLP compliance rules configured in your tenant: ```powershell Get-DlpComplianceRule | Format-List ``` This returns the full details of each DLP rule in list format, including rule names, conditions, actions, and parent policy information. 1. Copy the full output from the PowerShell window and paste it into a plain-text file (for example, Notepad), then save the file with a `.txt` extension — for example: `dlp_rules_export.txt`. 2. Alternatively, redirect the output directly to a file by running: ```powershell Get-DlpComplianceRule | Format-List | Out-File -FilePath ".\dlp_rules_export.txt" -Encoding UTF8 ``` Keep this file accessible — it will be uploaded into eSHARE in the next section. > [!WARNING] > 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. ### **Import DLP Rules into eSHARE** Once you have the exported `.txt` file from the previous section, navigate to the eSHARE Admin Console to import the rules. 1. Sign in to eSHARE and navigate to '**Admin Console**' > '**Sensitivity Labels & DLP Tags**'. 2. 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**'. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/image(181).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A42%3A46Z&se=2026-11-18T21%3A42%3A46Z&sr=b&sp=r&sig=OSn26znB7ld3mltYAcNtCfpU%2FSv4iH3dhW5ag4BDAlY%3D) 1. Click '**Add Rules**'. A file upload dialog will appear. ![](https://cdn.us.document360.io/c516537f-0d2f-4bf8-930d-3385ca9a11d7/Images/Documentation/image(182).png?sv=2026-02-06&spr=https&st=2026-11-18T20%3A42%3A46Z&se=2026-11-18T21%3A42%3A46Z&sr=b&sp=r&sig=MdF%2FbStbpwqmwmZo56SbpW7HUAIWDyGa1iPxGzFIYNA%3D) 1. Select the `.txt` file you exported in the previous section (for example, `dlp_rules_export.txt`) and confirm the upload. eSHARE will parse the file and import any new DLP rules found within it. 1. 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. > [!WARNING] > 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.