You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,8 @@ function New-CIPPCAPolicy {
61
61
$GroupIds.Add($NewGroup.GroupId)
62
62
}
63
63
} else {
64
-
Write-Warning"Group $_ not found in the tenant"
64
+
Write-Warning"Group $_ not found in the tenant and CreateGroups is disabled"
65
+
throw"Group '$_' not found in tenant $TenantFilter. Enable 'Create groups if they do not exist' or create the group manually before deploying this policy."
65
66
}
66
67
}
67
68
}
@@ -444,7 +445,7 @@ function New-CIPPCAPolicy {
444
445
# Preserve any exclusion groups named "Vacation Exclusion - <PolicyDisplayName>" from existing policy
Write-LogMessage-API 'Standards'-tenant $Tenant-message "Cannot compare CA policy: $nullSide returned null for $($Settings.TemplateList.label)"-sev Error
127
+
Set-CIPPStandardsCompareField-FieldName "standards.ConditionalAccessTemplate.$($Settings.TemplateList.value)"-FieldValue "Error comparing policy: $nullSide returned null"-Tenant $Tenant
0 commit comments