From 49a3d4c8eba407fff0676ffea9441b65a8800da3 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:57:49 +0100 Subject: [PATCH] template id remove --- Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1 b/Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1 index 3d5f1981d32a..10f1e81d45dc 100644 --- a/Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1 +++ b/Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1 @@ -58,6 +58,7 @@ function New-CIPPCAPolicy { #Remove context as it does not belong in the payload. try { $JsonObj.grantControls.PSObject.Properties.Remove('authenticationStrength@odata.context') + $JSONObj.templateId ? $JSONObj.PSObject.Properties.Remove('templateId') : $null if ($JSONObj.conditions.users.excludeGuestsOrExternalUsers.externalTenants.Members) { $JsonObj.conditions.users.excludeGuestsOrExternalUsers.externalTenants.PSObject.Properties.Remove('@odata.context') }