Power Platform data loss prevention (DLP) SDK
Note
The new and improved Power Platform admin center is now in public preview! We designed the new admin center to be easier to use, with task-oriented navigation that helps you achieve specific outcomes faster. We'll be publishing new and updated documentation as the new Power Platform admin center moves to general availability.
This topic introduces the capabilities of the DLP SDK and shows you how DLP can help you manage your tenant and environment policy with experiences ranging from creating, reading, updating, to removing DLP policies. More information : Data loss prevention policies
How to run this sample
Download or clone the Samples repo so that you have a local copy.
Open PowerShell ISE as an admin.
Run the following command:
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force
Edit RunSamples.ps1 and make the following changes:
- Replace $TenantAdminName value with your tenant admin account
- Replace $TenantAdminPassword value with your tenant admin account password
- Replace $EnvironmentAdminName value with your environment admin account
- Replace $EnvironmentAdminPassword value with your environment admin account password
Note: the tenant admin account should not be used as an environment admin account.
Run RunSamples.ps1.
What this sample does
This sample calls DLP APIs in Microsoft.PowerApps.Administration.PowerShell to create, read, update and remove DLP policies. Below are the scenarios supported by the SDK.
- Create a tenant-level policy that classifies connectors into Business, Non-business, and Blocked groups.
- Create policy for all environments except certain environments that classifies connectors into Business, Non-business, and Blocked groups.
- Create policy for single environment that classifies connectors into Business, Non-business, and Blocked groups.
- Get list of tenant-level policies (all environments).
- Update policy to move connector across groups (Business, Non-business, and Blocked).
- Test compatibility of existing policies that previously used legacy PowerShell APIs and now use new PowerShell APIs.
- Apply a data policy to all Teams environments within a tenant. More information: Applying a data policy to all Dataverse for Teams environments
How this sample works
This sample provides some DLP scenarios about how to call DLP APIs for your reference. You can run the sample and see the result.