🚨 CMMC Phase One started November 10! Here's everything you need to know →

Step-by-Step Guide to Automating Access Revocation for CUI When Employees Leave — NIST SP 800-171 REV.2 / CMMC 2.0 Level 2 - Control - PS.L2-3.9.2

Practical step-by-step instructions to automate revocation of access to Controlled Unclassified Information (CUI) on employee separation to meet NIST SP 800-171 Rev.2 / CMMC 2.0 Level 2 requirements.

April 10, 2026
5 min read

Share:

Schedule Your Free Compliance Consultation

Feeling overwhelmed by compliance requirements? Not sure where to start? Get expert guidance tailored to your specific needs in just 15 minutes.

Personalized Compliance Roadmap
Expert Answers to Your Questions
No Obligation, 100% Free

Limited spots available!

This guide walks you through automating revocation of access to Controlled Unclassified Information (CUI) when employees leave — a specific control (PS.L2-3.9.2) mapped to NIST SP 800-171 Rev.2 and CMMC 2.0 Level 2 — and provides practical, technical steps, small-business scenarios, and compliance tips so you can implement an auditable offboarding workflow that reduces insider risk and satisfies compliance audits.

Why this control matters (risks, objectives, and quick implementation notes)

Failure to promptly revoke access to CUI after an employee separation creates a high-risk window for data theft, accidental exposure, and lateral movement by malicious actors; compliance objectives are to ensure access is removed quickly, reliably, and with evidence for audits. Implementation notes for a Compliance Framework-focused program: treat the HR system as the authoritative source of truth, implement automated workflows that act on HR events (termination, end-of-contract), enforce role-based and time-bound access, and capture immutable logs of each revocation action for evidence and attestation.

Step-by-step automation plan

1) Inventory CUI assets and map access paths

Start by cataloging where CUI lives and how it is accessed: file shares (SMB/NFS), collaboration platforms (SharePoint, Google Drive), cloud storage (S3 buckets), databases, SaaS apps, admin consoles, VPNs, and local endpoints. For each asset record identity sources (Active Directory, Azure AD, Okta, Google Workspace), privileged accounts, service accounts, SSH keys, API keys, and certificates. This mapping will drive which APIs and actions your automation must call (e.g., remove AD group membership, deactivate Okta user, delete AWS access keys).

2) Make HR the authoritative trigger (HRIS → provisioning system)

Automate offboarding by integrating your HR system (BambooHR, Workday, ADP) with your identity provisioning system using SCIM, webhooks, or an iPaaS (Zapier, Workato, Mulesoft). Example flow: HR sets employee status to "terminated" → HRIS emits a webhook → orchestration engine (e.g., Azure Logic Apps, AWS Step Functions, or a custom Lambda) starts the offboarding runbook. Include verification steps: confirm termination date, confirm whether access should be immediate or delayed (e.g., end-of-day), and record the initiating user and timestamp as part of the audit trail.

3) Identity provider and IAM actions (exact API/CLI calls)

Use your IdP and cloud IAM APIs to execute deterministic actions. Examples: Okta — call the lifecycle API to deactivate/suspend: POST /api/v1/users/{id}/lifecycle/suspend; Azure AD / Microsoft Graph — revoke sessions: POST https://graph.microsoft.com/v1.0/users/{id}/revokeSignInSessions and disable the account (or set accountEnabled=false via Graph); PowerShell option: Revoke-AzureADUserAllRefreshToken -ObjectId <GUID>. AWS — remove console access and deactivate keys: aws iam update-access-key --user-name alice --access-key-id AKIA... --status Inactive and aws iam delete-login-profile --user-name alice. GCP — disable user OAuth tokens and remove group memberships via the Admin SDK. Always revoke refresh/session tokens and invalidate cached SSO sessions where possible.

4) Devices, certificates, and secrets

Offboarding must include endpoint and secrets remediation: trigger remote wipe/retire for managed devices via MDM (Microsoft Intune Graph API: POST /deviceManagement/managedDevices/{id}/wipe), remove device certificates from your PKI (add to CRL or update OCSP responder), and rotate or revoke credentials stored in vaults. For Vaults and secret stores, programmatically remove user-specific secrets and rotate service account credentials if the departed user had knowledge or access; for HashiCorp Vault use the API to revoke tokens and delete policies scoped to the user, and for Azure Key Vault rotate access policies and purge user access permissions.

Real-world small-business example (BambooHR + Okta + Azure AD + AWS)

Example workflow for a 50-person consultancy: BambooHR status change triggers a webhook to an AWS Lambda that orchestrates the offboard. Lambda calls Okta API to deactivate the user, removes Azure AD group memberships via Microsoft Graph and sets accountEnabled=false, calls aws iam update-access-key to deactivate any AWS keys and removes the user from AWS SSO groups, and posts a ticket to ServiceNow with the logs. The Lambda also calls the Intune Graph endpoint to wipe corporate mobile devices and triggers HashiCorp Vault to revoke user tokens. Each step writes structured events to CloudWatch (or Azure Monitor) and an immutable SIEM index (Splunk or Sentinel) for audit evidence and reporting.

Compliance tips, best practices, and verification

Best practices: (1) enforce time-bound access and use just-in-time privileged elevation so fewer long-lived permissions need revocation; (2) adopt least privilege and role-based access control to minimize the number of actions during offboarding; (3) maintain an auditable offboarding playbook and test it quarterly; (4) require HR-originated, signed termination events before automation runs (to prevent accidental deprovisioning); (5) implement periodic access reviews and automated attestations to catch stale accounts. Technical tip: add a final verification step that queries targeted systems to confirm the user no longer appears in group membership and that active sessions are terminated.

Risk of not automating or incompletely implementing this control

Manual offboarding is error-prone and slow — delayed revocation increases the window for data exfiltration or misuse of CUI, leads to failed audits, contractual penalties with DoD vendors, and bad incident response posture. Incomplete revocation (e.g., forgotten cloud keys or leftover service account access) is commonly exploited in post-employment data theft. Regulations and prime contracts expect demonstrable repeatable processes: without automated logs and evidence you risk noncompliance findings under NIST SP 800-171 and CMMC assessments.

Summary: implement an HR-driven, IdP-orchestrated offboarding automation that inventories CUI access points, revokes identities and sessions via IdP and cloud IAM APIs, wipes devices and revokes secrets, and records immutable logs for audit. For small businesses start with a simple webhook → orchestration function → IdP/cloud API flow, test it regularly, and expand to cover endpoints, certificates, and secret stores until you have end-to-end, auditable revocation for all CUI access paths.

 

Quick & Simple

Discover Our Cybersecurity Compliance Solutions:

Whether you need to meet and maintain your compliance requirements, help your clients meet them, or verify supplier compliance we have the expertise and solution for you

 CMMC Level 1 Compliance App

CMMC Level 1 Compliance

Become compliant, provide compliance services, or verify partner compliance with CMMC Level 1 Basic Safeguarding of Covered Contractor Information Systems requirements.
 NIST SP 800-171 & CMMC Level 2 Compliance App

NIST SP 800-171 & CMMC Level 2 Compliance

Become compliant, provide compliance services, or verify partner compliance with NIST SP 800-171 and CMMC Level 2 requirements.
 HIPAA Compliance App

HIPAA Compliance

Become compliant, provide compliance services, or verify partner compliance with HIPAA security rule requirements.
 ISO 27001 Compliance App

ISO 27001 Compliance

Become compliant, provide compliance services, or verify partner compliance with ISO 27001 requirements.
 FAR 52.204-21 Compliance App

FAR 52.204-21 Compliance

Become compliant, provide compliance services, or verify partner compliance with FAR 52.204-21 Basic Safeguarding of Covered Contractor Information Systems requirements.
 
Hello! How can we help today? 😃

Chat with Lakeridge

We typically reply within minutes