web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DLP for default enviro...
Power Apps
Unanswered

DLP for default enviroment but excempt all old resources (flows & apps) and apply it only for new resources

(0) ShareShare
ReportReport
Posted on by

Hello,

 

Unfortunately, we have encountered a problem when using the following PowerShell or API.

 

New-PowerAppDlpPolicyExemptResources -TenantId xxx -PolicyName xxx -NewDlpPolicyExemptResources $exemptResources

https://api.bap.microsoft.com/providers/PowerPlatform.Governance/v1/tenants/xxx/policies/bb8aa1cf-071e-4917-9f19-f388019ff3fe/exemptResources 

 

 Initial scenario:

 

We want to set a DLP for the default environment. Existing apps (approx. 200) and flows (approx. 800) should remain unaffected. The DLP should only apply to new apps and workflows. 

But at a certain size of the string to be transmitted of the object "$excemptResources" there is unfortunately an internal server error.
100 resources will work, 200 resources also, but then it will fail at a certain size.

 

aterbrack_0-1639384443372.png

 

 

 A command to submit individual apps and flows to exclude them does not exist or is not documented. 

 

Question: 

How can we achieve to exclude all resources (approx. 1000) at once from a DLP?  

 

 

Power Shell Script 

cls 

#Init Hashtable

$exemptResources = @{

    exemptResources = @()

}

 

#function to Ressources for excemption

function excemptResource($id,$type) {

  

   $exemptResource = @{

        id = $id

        type = $type

    }

 

    $exemptResources.exemptResources += $exemptResource   

}

 

$environment = Get-PowerAppEnvironment -Default

$flows = Get-AdminFlow -EnvironmentName $environment.EnvironmentName

$apps = Get-AdminPowerApp -EnvironmentName $environment.EnvironmentName

 

#iteration for all flows in this environment

foreach ($flow in $flows) {

 

    Write-Host $flow.DisplayName

    excemptResource $flow.Internal.id $flow.Internal.type

 

}

 

#iteration for all apps in this environment

foreach ($app in $apps) {

 

    Write-Host $app.DisplayName

    excemptResource $app.Internal.id $app.Internal.type

 

}

 

#add all current resources as an excemption to a dlp

New-PowerAppDlpPolicyExemptResources -TenantId  xxxx -PolicyName ba3ea951-cee9-40d4-987b-ea5677d9266b -NewDlpPolicyExemptResources $exemptResources

 

I have the same question (0)
  • Devikumari Krishna Profile Picture
    988 Super User 2024 Season 1 on at

    Hi @aterbrack ,

     

    Did you manage to resolve this issue?

    I suggest you to raise a Microsoft Support ticket if your issue still persist.

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    My Blog: Dynamics 365 Key Topics – https://d365topicsbydk.com/


    My Youtube Channel : https://www.youtube.com/channel/UCxSIryP2ah2VpEFr-Z72t1A

    Regards
    Devi

    Regards

    Devi

  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at

    Hi @aterbrack 

     

    I haven't done this before but I would assume that you are hitting some sort of limit and trying to use the exempt resources in a way that is not intended. Exemptions should be used as an exception, not the normal.

     

    I understand that you do not want to impact the existing apps and flows with a new DLP but I think there is a better long term approach.  I assume that you want to have some sort of DLP policy applied to the existing apps or flows?  Another option is to create new environment(s) with less restrictive DLP policies that will not affect your existing apps and flows.  Move the impacted apps and flows (using Solutions) from the Default environment to the new environment(s).  With that approach you will have DLP policies applied to all environments, without exemptions, and without impacting existing apps and flows.  This is obviously a lot more work but I think is a better long term solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard