Skip to content

Commit 6d53fcd

Browse files
fix
1 parent 6cbaf45 commit 6d53fcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/CIPPCore/Public/New-CIPPCAPolicy.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ function New-CIPPCAPolicy {
235235
}
236236
} else {
237237
Write-Information 'Creating'
238+
if ($JSONobj.GrantControls.authenticationStrength.policyType -or $JSONObj.$jsonobj.LocationInfo) {
239+
#quick fix for if the policy isn't available
240+
Start-Sleep 1
241+
}
238242
$null = New-GraphPOSTRequest -uri 'https://graph.microsoft.com/beta/identity/conditionalAccess/policies' -tenantid $tenantfilter -type POST -body $RawJSON -asApp $true
239243
Write-LogMessage -Headers $User -API $APINAME -tenant $($Tenant) -message "Added Conditional Access Policy $($JSONObj.Displayname)" -Sev 'Info'
240244
return "Created policy $displayname for $tenantfilter"

0 commit comments

Comments
 (0)