Skip to content

Conversation

@praneeth-0000
Copy link
Collaborator

Added test for 25396

Conditional Access policies enforce strong authentication for private apps

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new security assessment test (ID: 25396) that validates whether Conditional Access policies enforce strong authentication methods for Private Access applications within Microsoft Entra Global Secure Access.

Key changes:

  • Implements comprehensive test logic to evaluate Private Access applications (both Per-app and Quick Access types) for CA policy coverage requiring MFA or authentication strength
  • Introduces sophisticated authentication strength classification (Phishing-Resistant, Passwordless MFA, MFA baseline)
  • Provides detailed reporting with manual review capability for apps protected via applicationFilter-based policies

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/powershell/tests/Test-Assessment.25396.ps1 New test function that queries Private Access apps, evaluates CA policy coverage, classifies authentication strength levels, and generates detailed compliance reports with pass/fail/investigate status
src/powershell/tests/Test-Assessment.25396.md Documentation explaining security risks of unprotected private apps and providing remediation guidance with links to Microsoft Learn articles

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@praneeth-0000 praneeth-0000 self-assigned this Jan 6, 2026
@praneeth-0000 praneeth-0000 added enhancement New feature or request ready for review PR is ready for review and merging labels Jan 6, 2026
@praneeth-0000 praneeth-0000 marked this pull request as ready for review January 6, 2026 05:15
@praneeth-0000 praneeth-0000 marked this pull request as draft January 9, 2026 03:39
@praneeth-0000 praneeth-0000 marked this pull request as ready for review January 9, 2026 05:02
Copy link
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@praneeth-0000 Please, address my feedback.

Comment on lines +175 to +185
elseif ($authStrengthPolicy.policyType -eq 'custom') {
# Check if all allowed combinations are phishing-resistant
$allPhishingResistant = $true
foreach ($authMethod in $authStrengthPolicy.allowedCombinations) {
if ($authMethod -notin $phishingResistantMethods) {
$allPhishingResistant = $false
break
}
}
$currentLevel = if ($allPhishingResistant) { 'PhishingResistant' } else { 'MFA' }
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: This logic fails to handle multi-factor combinations correctly. The allowedCombinations array contains strings like:

"windowsHelloForBusiness" (single factor)
"password,microsoftAuthenticatorPush" (combination)
"password,sms" (combination)
When a custom auth strength has allowedCombinations = @("password,fido2"), the current logic checks if "password,fido2" is in the phishing-resistant list, finds it's not, and classifies as MFA instead of PhishingResistant.

Correct Implementation:

elseif ($authStrengthPolicy.policyType -eq 'custom') {
    $allPhishingResistant = $true
    foreach ($combination in $authStrengthPolicy.allowedCombinations) {
        # Split combination by comma and check each method
        $methods = $combination -split ','
        $hasPhishingResistantMethod = $false
        foreach ($method in $methods) {
            if ($phishingResistantMethods -contains $method.Trim()) {
                $hasPhishingResistantMethod = $true
                break
            }
        }
        if (-not $hasPhishingResistantMethod) {
            $allPhishingResistant = $false
            break
        }
    }
    $currentLevel = if ($allPhishingResistant) { 'PhishingResistant' } else { 'MFA' }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alexandair , checked the "allowedCombinations" property, it has individual strings without commas

image

and coming to logic part, @tdetzner could you please confirm in the scenario where allowedCombinations has password , fido2 should the authentication strength level be phishing resistant or mfa?

According to docx "phishingResistant: Built-in phishing-resistant strength OR custom strength with only phishing-resistant methods", I thought the allowedCombinations should only contain one or all phishing resistant methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready for review PR is ready for review and merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants