Skip to content

Commit fe8c2ce

Browse files
CopilotSamErde
andauthored
Fix CISA.MS.AAD.1.1 to require legacy auth blocking policy scoped to all cloud apps (#1651)
* Initial plan * Fix CISA.MS.AAD.1.1 to require CA policy scoped to all cloud apps Add check for conditions.applications.includeApplications containing "All" to both the $blockOther and $blockExchangeActiveSync filters in Test-MtCisaBlockLegacyAuth. Without this check, a CA policy blocking legacy auth for only specific apps (not all cloud apps) would incorrectly pass the test. Fixes #864 Agent-Logs-Url: https://github.com/maester365/maester/sessions/98fa17c8-0648-471d-8fee-2bfa6b730cc8 Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
1 parent 638414b commit fe8c2ce

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

powershell/public/cisa/entra/Test-MtCisaBlockLegacyAuth.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
$blockOther = $result | Where-Object {
3535
$_.grantControls.builtInControls -contains "block" -and
3636
$_.conditions.clientAppTypes -contains "other" -and
37-
$_.conditions.users.includeUsers -contains "All"
37+
$_.conditions.users.includeUsers -contains "All" -and
38+
$_.conditions.applications.includeApplications -contains "All"
3839
}
3940

4041
$blockExchangeActiveSync = $result | Where-Object {
4142
$_.grantControls.builtInControls -contains "block" -and
4243
$_.conditions.clientAppTypes -contains "exchangeActiveSync" -and
43-
$_.conditions.users.includeUsers -contains "All"
44+
$_.conditions.users.includeUsers -contains "All" -and
45+
$_.conditions.applications.includeApplications -contains "All"
4446
}
4547

4648
if (($blockOther | Measure-Object).Count -ge 1 -and ($blockExchangeActiveSync | Measure-Object).Count -ge 1) {
@@ -52,7 +54,7 @@
5254
if ($testResult) {
5355
$testResultMarkdown = "Your tenant has one or more policies that block legacy authentication:`n`n%TestResult%"
5456
} else {
55-
$testResultMarkdown = "Your tenant lacks sufficient conditional access policies that block legacy authentication."
57+
$testResultMarkdown = "Your tenant lacks sufficient conditional access policies that block legacy authentication for all cloud apps."
5658
}
5759
Add-MtTestResultDetail -Result $testResultMarkdown -GraphObjectType ConditionalAccess -GraphObjects $blockPolicies
5860

0 commit comments

Comments
 (0)