Skip to main content
ShadowAI Defense GitHub
← All detections
DET-MS-CA-003 Conditional Access Identity config Severity: Medium

Conditional Access — Require compliant device for AI service access

Conditional Access policy that enforces device compliance requirements before allowing access to AI service applications, ensuring that only managed devices with up-to-date security controls can interact with AI platforms.

Rule

# Microsoft Entra Conditional Access — Require Compliant Device for AI Service Access
# Navigation: Entra Admin Center > Protection > Conditional Access > New Policy
#
# Policy: Require Compliant Device for AI Services
#
# Assignments:
#   Users:
#     - Include: All users
#     - Exclude: Break-glass accounts, service accounts
#
#   Target resources:
#     - Select: Specific cloud apps
#     - Apps (register as enterprise apps or use app filter):
#       - ChatGPT (OpenAI) — app ID from Entra gallery or manual registration
#       - Claude (Anthropic) — manual registration with SSO redirect URIs
#       - Gemini (Google) — manual registration
#       - GitHub Copilot — from Entra gallery
#       - Any other AI apps registered in Entra for SSO
#     - Filter for applications (supplementary):
#       - customSecurityAttribute.AIGovernance.requiresCompliance == true
#
#   Conditions:
#     - Device platforms: All (Windows, macOS, iOS, Android, Linux)
#     - Client apps: Browser, Mobile apps and desktop clients
#     - Locations: All locations (including trusted)
#
# Access controls:
#   Grant:
#     - Require device to be marked as compliant
#     - OR Require Hybrid Azure AD joined device
#     - For multiple controls: Require one of the selected controls
#
# Session controls:
#   - Sign-in frequency: 8 hours (force re-evaluation of compliance)
#   - Persistent browser session: Disabled (no 'stay signed in' for AI services)
#
# Intune Compliance Policy requirements (must be met for device to be 'compliant'):
#   Windows:
#     - BitLocker encryption: Required
#     - Firewall: Required
#     - Antivirus: Required and up to date
#     - OS version: minimum supported version
#     - Defender for Endpoint risk score: Clear or Low
#   macOS:
#     - FileVault encryption: Required
#     - System Integrity Protection: Enabled
#     - Gatekeeper: Enabled
#   Mobile:
#     - Device encryption: Required
#     - Not jailbroken/rooted: Required
#     - Minimum OS version: defined per platform
#
# Monitoring:
#   - Sign-in logs: filter by policy name to identify non-compliant access attempts
#   - Compliance dashboard: track device compliance rate across AI service users
#   - Alert on sustained non-compliance attempts (> 5 per user per day)

How it works

Ensures that AI service access only occurs from devices under organizational management with verified security controls. This is critical for Shadow AI defense because a compliant device has endpoint DLP (DET-MS-PV-001, DET-MS-PV-002), endpoint detection (DET-MS-MDE-001, DET-MS-MDE-002, DET-MS-MDE-003), and network monitoring (DET-MS-SEN-001) active. Without device compliance, a user accessing an AI service from an unmanaged personal device bypasses the entire detective and preventive control stack. The 8-hour sign-in frequency ensures compliance state is re-evaluated throughout the workday, catching devices that fall out of compliance (e.g., disabled antivirus, overdue patches). This policy complements DET-MS-CA-001 (which blocks unmanaged devices from all apps) by adding AI-specific enforcement for organizations doing phased rollout.

Required data sources

  • Microsoft Entra ID P1 or higher
  • Microsoft Intune (device compliance state)
  • Entra ID sign-in logs

Prerequisites

  • Entra ID P1+ licensed
  • Microsoft Intune licensed and devices enrolled
  • Intune compliance policies configured and deployed
  • AI service applications registered in Entra ID (either from gallery or manual registration)
  • Break-glass accounts created and excluded
  • Minimum 80% device enrollment rate before enforcing (to avoid mass lockout)

Expected volume

Blocked access attempts: 20-60/day initially, dropping to 5-15/day as device enrollment completes. Most blocks will be from unmanaged personal devices or non-compliant corporate devices with overdue patches.

False-positive guidance

Devices that temporarily fall out of compliance (e.g., pending reboot for patches, antivirus definition update in progress) will be blocked until compliance is restored. This is by design but may frustrate users — ensure Intune compliance grace periods are configured appropriately. Contractor devices on BYOD programs may not be enrolled in Intune — provide a web-based alternative or Company Portal enrollment path.

Tuning steps

  1. Deploy in report-only mode for 2 weeks to measure impact.
  2. Review non-compliant device reasons — address systemic compliance gaps before enforcing.
  3. Configure Intune compliance grace periods (recommended: 24 hours for patch-related non-compliance).
  4. Register all sanctioned AI services as enterprise applications in Entra ID.
  5. Add custom security attributes to AI apps for scalable policy targeting.
  6. Phase rollout: pilot group -> department -> enterprise-wide.
  7. Pair with Company Portal self-service enrollment for users on non-enrolled devices.

Framework mappings

  • NIST AI RMF: GOVERN-4.1
  • ISO/IEC 42001: 8.2
  • NIST CSF: PR.AC-1, PR.AC-3, PR.IP-1

Related AI Controls Catalog entries