Analyze your Entra ID Conditional Access policies for best practices, FOCI token-sharing risks, known CA bypasses, CIS v6.0 benchmark alignment, and MS Learn documented exclusions β directly in your browser, no install required.
No download. No install. No server.
π [https://pushai2026.github.io/ca-policy-analyzer/)
The app runs 100% in your browser β your data never leaves your machine. It connects directly to Microsoft Graph using your own credentials (delegated permissions).

owner/repo shorthandidentifyBreakGlass() helper shared by per-policy and tenant-wide checksAAD_WRKLDID_P1 and AAD_WRKLDID_P2See CHANGELOG.md for full details.
The dashboard shows your overall security score (0β100), policy counts by state, and a severity breakdown of all findings.

Every CA policy is rendered as an expandable flow card showing Users β Conditions β Apps β Grant/Session Controls. Critical and high-severity policies are highlighted with coloured borders.

All detected issues ranked Critical β Info. Expand any finding to see the full description, affected policy, and a remediation recommendation.

39 best-practice templates (including Workload Identity) compared against your tenant. Each template shows whether you have a matching policy, a partial match, or a gap.

18 controls from the CIS Microsoft 365 Foundations Benchmark v6.0.0 with an alignment score ring. Each control shows pass/fail status, matching policies, and remediation guidance.

17 checks sourced from Microsoft Learn flag policies that are missing required exclusions or using deprecated grant controls. Findings are grouped by check type β similar policies are consolidated under a single card showing all affected policies.

The Locations tab maps every named location (IP ranges, countries, compliant networks) to the Conditional Access policies that reference it β showing whether each location is used as an include or exclude condition. It flags orphaned references, untrusted locations used with βAll Trusted Locationsβ, empty country lists, and overly broad IP ranges.

CA Policy Analyzer connects to your Entra ID tenant via Microsoft Graph and:
The Security Posture Score is a composite 0β100 score built from three weighted pillars. This ensures the score reflects CIS compliance, best-practice coverage, and real configuration quality β not just one dimension.
| Pillar | Max Points | What It Measures |
|---|---|---|
| CIS Alignment | 50 | Weighted pass rate of CIS L1/L2 benchmark controls |
| Template Coverage | 25 | How well your policies match the 37 best-practice templates |
| Configuration Quality | 25 | Deductions based on severity of detected findings |
The CIS component is the dominant factor. Each of the 19 CIS v6.0.0 controls is weighted by level:
| CIS Result | Points Earned |
|---|---|
| Pass | Full weight (3Γ for L1, 1Γ for L2) |
| Manual | 50% of weight |
| Fail | 0 |
The formula: cisScore = (weightEarned / weightTotal) Γ 50
Uses a priority-weighted coverage score across the 37 best-practice policy templates. High-priority templates (MFA, legacy auth block, device compliance) contribute more to this score than optional hardening templates.
The formula: templateScore = (coverageScore / 100) Γ 25
Starts at 25 and deducts points for each security finding. Per-severity caps prevent a single category from consuming the entire budget:
| Severity | Deduction per Finding | Cap |
|---|---|---|
| Critical | 5 pts | 15 pts max |
| High | 1.5 pts | 10 pts max |
| Medium | 0.5 pts | 8 pts max |
| Low | 0.25 pts | 3 pts max |
Total deductions are also capped at 25 (the full budget).
| Grade | Score Range |
|---|---|
| A | 90 β 100 |
| B | 80 β 89 |
| C | 65 β 79 |
| D | 50 β 64 |
| F | 0 β 49 |
CIS Alignment: 42 / 50 (all L1 passing, 2 L2 failing)
Template Coverage: 19 / 25 (76% weighted coverage)
Configuration Quality: 18 / 25 (2 critical, 1 high finding)
βββββββββββββββββββββββββββββββ
Overall Score: 79 / 100 β Grade: C
/subscribedSkus endpoint and adjusts scoring accordingly. Templates and CIS controls that require licenses you donβt have are marked N/A and excluded from gap/pass-fail calculations, so your score reflects only what is achievable with your current licensing.The app has six tabs accessible after running an analysis:
| Tab | What It Shows |
|---|---|
| Dashboard | Security posture score (0β100), severity breakdown, risk category distribution, and at-a-glance stats |
| Policies | Every CA policy visualized as a flow card: Users β Conditions β Apps β Grant/Session Controls |
| Findings | All detected issues ranked by severity (Critical β Info) with affected policies and remediation guidance |
| Templates | 39 best-practice policy templates compared against your tenant β shows matched, partial, and missing policies including Workload Identity policies |
| CIS | CIS Microsoft 365 Foundations Benchmark v6.0.0 alignment β 18 controls across sections 5.3 (Conditional Access) and 5.4 (Identity Protection & Device Controls) |
| MS Learn | Documented exclusion checks sourced from Microsoft Learn β flags policies missing required exclusions for token protection, Surface Hub, Teams Rooms, break-glass, CAE, and more |
Click the Export JSON button (visible when results are loaded) to download the complete analysis as a JSON file, including all findings, CIS results, exclusion checks, and raw policy data.
| Category | What It Detects |
|---|---|
| FOCI Token Sharing | Excluded apps that belong to the Family of Client IDs β tokens interchangeable across 45+ Microsoft apps |
| Resource Exclusion Bypass | Excluding ANY app from βAll cloud appsβ leaks Azure AD Graph & MS Graph basic scopes |
| CA-Immune Resources | 6 Microsoft resources completely excluded from CA enforcement (always notApplied) |
| Device Registration Bypass | Device Registration Service ignores location and device compliance β only MFA works |
| Swiss Cheese Model | Grant controls using OR instead of AND, missing MFA baseline layer |
| Legacy Authentication | Legacy auth clients targeted but not blocked |
| Known CA Bypass Apps | Apps with documented CA bypass capabilities (Azure CLI, PowerShell, AAD Connect, etc.) |
| Tenant-Wide Gaps | Missing MFA-for-all, no legacy auth block, no break-glass accounts |
18 controls from CIS Microsoft 365 Foundations Benchmark v6.0.0:
| Control | Title | Level |
|---|---|---|
| 5.3.1 | MFA required for all users | L1 |
| 5.3.2 | MFA required for administrative roles | L1 |
| 5.3.3 | MFA required for guest and external users | L1 |
| 5.3.4 | Phishing-resistant MFA for administrators | L1 |
| 5.3.5 | MFA required to register or join devices | L1 |
| 5.3.6 | Sign-in risk policy configured | L1 |
| 5.3.7 | User risk policy configured | L1 |
| 5.3.8 | Access from non-allowed countries blocked | L1 |
| 5.3.9 | Legacy authentication blocked | L1 |
| 5.3.10 | Continuous access evaluation not disabled | L1 |
| 5.3.11 | Unknown/unsupported device platforms blocked | L1 |
| 5.3.12 | Device code flow blocked | L1 |
| 5.3.13 | Sign-in frequency for admin portals limited | L2 |
| 5.4.1 | High-risk users blocked | L1 |
| 5.4.2 | High-risk sign-ins blocked | L1 |
| 5.4.3 | Compliant device requirement configured | L2 |
| 5.4.4 | Token protection for sensitive applications | L2 |
| 5.4.5 | App protection policy for mobile devices | L2 |
16 checks sourced from Microsoft Learn documentation:
| Check | Severity | What It Flags |
|---|---|---|
| Token Protection β Apps | High | Targeting βAll appsβ instead of only Exchange/SPO/Teams/AVD/W365 |
| Token Protection β Platform | High | Not restricting to Windows-only + desktop clients |
| Token Protection β Devices | High | Missing Surface Hub, Teams Rooms, Cloud PC device exclusions |
| Break-glass accounts | Critical | All Users enforcement policies with no user exclusions |
| Surface Hub β MFA | Medium | MFA/compliance policies without Surface Hub exclusion |
| Teams Rooms β MFA | Medium | MFA/auth strength policies without Teams Rooms exclusion |
| Teams Rooms β Sign-in frequency | Medium | Sign-in frequency causing periodic sign-outs |
| Device code flow β Teams Android | Medium | Blocking device code breaks Teams Android remote sign-in |
| Defender Mobile | Medium | Restrictive policies without Defender ATP exclusion |
| Azure VM Sign-In β MFA | Medium | MFA/compliance policies without Azure VM Sign-In app exclusion |
| CAE disabled | High | Policies explicitly disabling continuous access evaluation |
| Sign-in frequency β Individual services | Medium | Targeting individual M365 services breaks Teams |
| Resilience disabled | Medium | Policies disabling resilience defaults |
| All Resources scope change | High | Low-privilege scope exemption ending March 2026 |
| Directory Sync Account | Medium | MFA policy excluding DirSync role β Entra Connect v2.5.76.0+ supports app-based auth (version history) |
| External Auth Method (EAM) | High | EAM (DUO, RSA) on All Users policy blocks guests and external vendors who canβt enroll |
When the analyzer detects a policy that excludes a FOCI app, it produces a finding like this:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π΄ Critical F-0003 FOCI Token Sharing β
β β
β FOCI app excluded: Microsoft Teams (1fec8e78-bce4-...) β
β β
β Policy: "Block all except core apps" β
β β
β This policy excludes Microsoft Teams, which belongs to FOCI β
β family "Microsoft Office". Excluding one FOCI member means β
β all 45+ apps in the family can share refresh tokens to β
β bypass this policy entirely. β
β β
β π‘ Recommendation: Instead of excluding FOCI apps from a β
β block/MFA policy, create a dedicated allow policy for β
β the specific app. β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The CIS tab shows each of the 18 v6.0 controls with a pass/fail badge, matched policies, and remediation if failing:
β
5.3.1 β Ensure multifactor authentication is required for all users [L1]
Found 2 policy(ies) requiring MFA for all users and all apps.
Policies: "CA001 β Require MFA for all users", "Baseline β MFA"
β 5.3.4 β Ensure phishing-resistant MFA for administrators [L1]
No policy enforces phishing-resistant authentication strength for admin roles.
Remediation: Create a CA policy targeting admin roles with authentication
strength set to "Phishing-resistant MFA" (FIDO2, CBA, Windows Hello).
β
5.3.10 β Ensure continuous access evaluation is not disabled [L1]
No policy disables continuous access evaluation. CAE is active.
If a token protection policy targets βAll cloud appsβ instead of only the supported services, the MS Learn tab flags it:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π΄ Critical β Token Protection: Unsupported App Scope β
β β
β Policy: "Require token protection" β
β β
β Assessment: Token protection only works with Exchange β
β Online, SharePoint Online, and Teams. This policy targets β
β "All cloud apps" which will cause sign-in failures for β
β unsupported applications. β
β β
β π MS Learn Requirement: Target only Exchange Online β
β (00000002-0000-0ff1-ce00-000000000000), SharePoint β
β Online (00000003-0000-0ff1-ce00-000000000000), and β
β Microsoft Teams Services. β
β β
β Remediation: Change the policy to target only Exchange β
β Online, SharePoint Online, Teams, Azure Virtual Desktop, β
β and Windows 365. β
β β
β π https://learn.microsoft.com/en-us/entra/identity/... β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The Templates tab highlights best-practice policies you havenβt implemented yet:
β Missing β Block legacy authentication
Template: CA006-Global-BlockLegacyAuthentication
No matching policy found in your tenant.
Description: Block Exchange ActiveSync and other legacy
auth clients for all users.
π‘ Partial match β Require compliant device for mobile
Template: CA012-Global-RequireCompliantDevice-Mobile
Your policy "Device compliance β iOS" covers iOS but
does not include Android. Match score: 62%
The Export JSON button downloads the full analysis. The JSON follows this structure:
{
"tenantSummary": {
"totalPolicies": 24,
"enabledPolicies": 18,
"reportOnlyPolicies": 4,
"disabledPolicies": 2,
"totalFindings": 13,
"criticalFindings": 2,
"highFindings": 4,
"mediumFindings": 5,
"lowFindings": 1,
"infoFindings": 1
},
"overallScore": 72,
"findings": [
{
"id": "F-0001",
"policyId": "aaaa-bbbb-...",
"policyName": "Block all except core apps",
"severity": "critical",
"category": "FOCI Token Sharing",
"title": "FOCI app excluded β entire family can bypass this policy",
"description": "...",
"recommendation": "..."
}
// ... additional findings
],
"exclusionFindings": [
{
"checkId": "token-prot-apps",
"severity": "critical",
"title": "Token Protection: Unsupported App Scope",
"policyName": "Require token protection",
"assessment": "...",
"requirement": "...",
"remediation": "...",
"docUrl": "https://learn.microsoft.com/..."
}
// ... additional exclusion findings
],
"policyResults": [
// Full policy data + per-policy findings + flow visualization
]
}
The app requests these Microsoft Graph delegated permissions when you sign in:
| Permission | Why |
|---|---|
Policy.Read.All |
Read Conditional Access policies |
Application.Read.All |
Resolve service principal names referenced in policies |
Directory.Read.All |
Resolve groups, roles, and users referenced in policies |
All three permissions require admin consent β regular users cannot self-consent.
Before non-admin users can sign in, an admin must grant tenant-wide consent to the app. The minimum Entra ID role required to consent depends on the permission type:
| Role | Can Consent? | Notes |
|---|---|---|
| Cloud Application Administrator | β Yes | Least-privileged role that can consent to delegated permissions for any app. Recommended. |
| Application Administrator | β Yes | Can also consent to delegated permissions; slightly broader than Cloud App Admin |
| Global Administrator | β Yes | Can always consent, but overprivileged for this task |
| Privileged Role Administrator | β No | Cannot consent to app permissions |
| Security Administrator | β No | Cannot consent to app permissions |
How to consent: A Cloud Application Administrator (or above) should navigate to the app URL, sign in, and approve the permissions on the consent screen. This grants tenant-wide consent so all other users can use the app without seeing the βNeed admin approvalβ prompt.
Alternatively, an admin can pre-consent via Entra Admin Center β Enterprise Applications β ca-policy-analyzer β Permissions β Grant admin consent.
Once admin consent has been granted, the minimum Entra ID role a user needs to sign in and run the analysis is:
| Role | Works? | Notes |
|---|---|---|
| Security Reader | β Yes | Least-privileged. Read-only access to CA policies, directory objects, and apps. Recommended. |
| Global Reader | β Yes | Works but broader than necessary |
| Conditional Access Administrator | β Yes | Overprivileged β has write access the tool doesnβt need |
| Regular user (no role) | β οΈ Partial | Can read basic directory objects but may not read all CA policy details |
The app uses a multi-tenant app registration β no per-tenant setup needed.
If you want to run locally, fork, or contribute:
git clone https://github.com/Jhope188/ca-policy-analyzer.git
cd ca-policy-analyzer
npm install
npm run dev
Open http://localhost:3000 and click Connect Tenant.
Note: The app comes with a built-in Client ID for the hosted app registration. If you fork this project and want to use your own, set
NEXT_PUBLIC_MSAL_CLIENT_IDin a.env.localfile.
npm run build # Outputs static site to ./out
The GitHub Actions workflow in .github/workflows/deploy-pages.yml automatically builds and deploys to GitHub Pages on every push to main.
src/
βββ app/ # Next.js App Router β main page with 6 tab views
βββ components/ # Auth provider, header, dashboard, policy list, findings,
β # templates view, CIS view, exclusions view, UI primitives
βββ data/ # FOCI database (45 apps), CA bypass database (13 apps),
β # Entra sync attack vectors (8), CIS v6.0 benchmarks (18 controls),
β # policy templates (39), MS Learn documented exclusions (16 checks)
βββ lib/ # MSAL config, Graph client, analyzer engine (13 checks),
# template matcher
MIT