Skip to content

Commit 46cc031

Browse files
committed
fix CA check
1 parent 0439ff3 commit 46cc031

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ExecCACheck.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-ExecCaCheck {
3+
function Invoke-ExecCaCheck {
44
<#
55
.FUNCTIONALITY
66
Entrypoint
@@ -23,18 +23,18 @@ Function Invoke-ExecCaCheck {
2323
}
2424
$results = try {
2525
$CAContext = @{
26-
'@odata.type' = '#microsoft.graph.whatIfApplicationContext'
26+
'@odata.type' = '#microsoft.graph.applicationContext'
2727
'includeApplications' = @($IncludeApplications)
2828
}
2929
$ConditionalAccessWhatIfDefinition = @{
30-
'conditionalAccessWhatIfSubject' = @{
31-
'@odata.type' = '#microsoft.graph.userSubject'
30+
'signInIdentity' = @{
31+
'@odata.type' = '#microsoft.graph.userSignIn'
3232
'userId' = "$userId"
3333
}
34-
'conditionalAccessContext' = $CAContext
35-
'conditionalAccessWhatIfConditions' = @{}
34+
'signInContext' = $CAContext
35+
'signInConditions' = @{}
3636
}
37-
$whatIfConditions = $ConditionalAccessWhatIfDefinition.conditionalAccessWhatIfConditions
37+
$whatIfConditions = $ConditionalAccessWhatIfDefinition.signInConditions
3838
if ($Request.body.UserRiskLevel) { $whatIfConditions.userRiskLevel = $Request.body.UserRiskLevel.value }
3939
if ($Request.body.SignInRiskLevel) { $whatIfConditions.signInRiskLevel = $Request.body.SignInRiskLevel.value }
4040
if ($Request.body.ClientAppType) { $whatIfConditions.clientAppType = $Request.body.ClientAppType.value }

0 commit comments

Comments
 (0)