Skip to content

Commit

Permalink
Update Test-MtCaMfaForAdminManagement.ps1
Browse files Browse the repository at this point in the history
Add check for includeApplications - All
  • Loading branch information
DanielWahlgren authored Nov 14, 2024
1 parent cb15c2c commit daec649
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions powershell/public/Test-MtCaMfaForAdminManagement.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function Test-MtCaMfaForAdminManagement {
if ( ( $policy.grantcontrols.builtincontrols -contains 'mfa' `
-or $policy.grantcontrols.authenticationStrength.requirementsSatisfied -contains 'mfa' ) `
-and $policy.conditions.users.includeUsers -eq "All" `
-and "797f4846-ba00-4fd7-ba43-dac1f8f63013" -in $policy.conditions.applications.includeApplications `
-and ("797f4846-ba00-4fd7-ba43-dac1f8f63013" -in $policy.conditions.applications.includeApplications `
-or $policy.conditions.applications.includeApplications -contains "All") `
) {
$result = $true
$currentresult = $true
Expand All @@ -43,4 +44,4 @@ function Test-MtCaMfaForAdminManagement {
}

return $result
}
}

0 comments on commit daec649

Please sign in to comment.