File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Entrypoints/HTTP Functions/Tenant/Conditional Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11using namespace System.Net
22
3- Function Invoke-AddCAPolicy {
3+ function Invoke-AddCAPolicy {
44 <#
55 . FUNCTIONALITY
66 Entrypoint
@@ -19,7 +19,7 @@ Function Invoke-AddCAPolicy {
1919
2020 $results = foreach ($Tenant in $tenants ) {
2121 try {
22- $CAPolicy = New-CIPPCAPolicy - replacePattern $Request.Body.replacename - Overwrite $request.Body.overwrite - TenantFilter $Tenant - state $Request.Body.NewState - RawJSON $Request.Body.RawJSON - APIName $APIName - Headers $Headers
22+ $CAPolicy = New-CIPPCAPolicy - replacePattern $Request.Body.replacename - Overwrite $request.Body.overwrite - TenantFilter $Tenant - state $Request.Body.NewState - DisableSD $Request .Body.DisableSD - RawJSON $Request.Body.RawJSON - APIName $APIName - Headers $Headers
2323 " $CAPolicy "
2424 } catch {
2525 " $ ( $_.Exception.Message ) "
Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ function New-CIPPCAPolicy {
231231 $body = ' { "isEnabled": false }'
232232 $null = New-GraphPostRequest - tenantid $tenant - Uri ' https://graph.microsoft.com/beta/policies/identitySecurityDefaultsEnforcementPolicy' - Type patch - Body $body - ContentType ' application/json'
233233 Write-LogMessage - Headers $User - API $APINAME - tenant $ ($Tenant ) - message " Disabled Security Defaults for tenant $ ( $TenantFilter ) " - Sev ' Info'
234+ Start-Sleep 3
234235 }
235236 $RawJSON = ConvertTo-Json - InputObject $JSONObj - Depth 10 - Compress
236237 Write-Information $RawJSON
You can’t perform that action at this time.
0 commit comments