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

How to Automate Immediate Access Revocation for Departing Employees (AD, MFA, Cloud) β€” NIST SP 800-171 REV.2 / CMMC 2.0 Level 2 - Control - PS.L2-3.9.2

Step-by-step guide to automating immediate revocation of access for departing employees across Active Directory, MFA, and cloud services to meet NIST SP 800-171 Rev.2 / CMMC 2.0 Level 2 control PS.L2-3.9.2.

β€’
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 post gives a practical, implementation-focused playbook for automating immediate access revocation for departing employees across Active Directory (on-prem and Azure AD), MFA/IDP platforms, and cloud providers β€” mapped specifically to NIST SP 800-171 Rev.2 and CMMC 2.0 Level 2 control PS.L2-3.9.2 β€” so small and mid-sized organizations can achieve repeatable, auditable deprovisioning with minimal manual steps.

Why immediate, automated revocation matters (risk and compliance)

Failing to quickly and reliably remove access for departing users is one of the highest-risk operational gaps for compliance frameworks like NIST 800-171 and CMMC 2.0: ex-employees with live accounts can access CUI, create backdoors, or maintain stolen credentials for months. From a compliance perspective PS.L2-3.9.2 expects that you can remove access when employment ends; from a security perspective, automation reduces delay, human error, and the β€œwho forgot?” gap that attackers exploit. For small businesses this risk is magnified because staff overlap and manual processes are common.

Core components of an automated deprovisioning system

Design the automation around four interoperable components: the authoritative HR event source (e.g., Workday, BambooHR), an identity lifecycle/IGA layer or IDP with SCIM (e.g., Azure AD / Microsoft Entra, Okta, Google Cloud Identity), a serverless orchestration / SOAR or workflow engine (Azure Functions, AWS Lambda, Power Automate, or a SOAR like Demisto) and connectors/api calls to target systems (Active Directory, MFA method stores, AWS/IAM, GCP, SaaS). Logging, ticketing, and an attestation step close the loop for auditors.

Active Directory (on‑prem) practical steps

For on-prem AD, automate these actions from the HR event: (1) Disable account (Set-ADUser -Identity jsmith -Enabled $false), (2) Move account to a β€œDeparted” OU with restrictive GPOs, (3) Clear or randomize password, (4) Expire Kerberos tickets by resetting password and optionally forcing a machine-to-domain password reset for service accounts. Use the AD PowerShell module on a secure runbook server or Azure Automation runbook that receives the HR webhook. If you have Azure AD Connect, ensure the on-prem disable syncs to Entra (Azure AD) to avoid cloud residual access.

MFA and Identity Provider (IDP) details

Modern IDPs expose APIs to block sign-in, revoke sessions, and remove authentication methods. For Microsoft Entra (Azure AD): call the Graph API to set accountEnabled=false, and POST /users/{id}/revokeSignInSessions to invalidate refresh tokens, plus delete authentication methods: DELETE /users/{id}/authentication/phoneMethods/{id}. For Okta: expire all sessions, reset password, and remove factors via the Sessions and Factors API. For Google Workspace: use Admin SDK to suspend users (users.patch with suspended=true) and Tokens API to delete OAuth tokens. Automate these via a secure function that runs only on HR termination events and stores calls in an immutable audit log.

Cloud providers (AWS, GCP, Azure) β€” concrete actions

For AWS IAM: immediately deactivate access keys (aws iam update-access-key --access-key-id AKIA... --status Inactive), remove console access (aws iam delete-login-profile --user-name user), and detach policies/inline permissions; if the user had STS sessions, rotate any long-lived roles or revoke role session tokens by removing role trust or using session policies. For GCP, use Directory API to suspend the GSuite user and use Service Account Key rotation and revocation for any service accounts the user managed. For Azure subscriptions, remove Role Assignments and revoke refresh tokens as above. Implement these API calls in your orchestration function, with retries and error handling to guarantee completion.

Small-business example workflow (real-world)

Example: 50-employee company uses BambooHR (HR), Microsoft Entra (IDP), on-prem AD (Windows), and AWS for cloud workloads. Workflow: HR marks termination in BambooHR β†’ BambooHR webhook triggers an Azure Function with a short-lived managed identity β†’ Function calls on-prem automation endpoint (via VPN) to Disable-ADAccount and move to Departed OU β†’ Function calls Microsoft Graph to revokeSignInSessions and remove MFA methods β†’ Function calls AWS IAM API to set access keys inactive and remove console login β†’ Function creates a ticket in the helpdesk with a checklist and logs every API response to an append-only storage bucket for audit. You can implement the Azure Function in C# or PowerShell; use service principals with conditional access to ensure the function itself is protected.

Implementation tips, hardening and best practices

1) Authoritative HR event: Make HR the single source of truth for employment status; enforce approvals on termination events. 2) Use SCIM where available to let IDPs auto-sync status. 3) Least privilege + ephemeral credentials: replace long-lived keys with short-lived sessions and PAM for privileged accounts. 4) Tamper-evident logging: store deprovisioning logs in immutable storage and integrate with SIEM. 5) Test and validate: run tabletop exercises and simulate terminations monthly. 6) Have a rollback/safety process for accidental terminations that includes an emergency re-provisioning playbook and an approver flow. 7) Maintain a documented runbook that maps each target system to the exact API call used β€” auditors like clarity.

Consequences and control assessment for auditors

From a control-assessment standpoint, demonstrate automation by providing: (a) the orchestration flow diagram, (b) sample webhook payload and workflow logs showing the HR event and each API call with timestamps, (c) record of the IDP/user object state before/after, and (d) ticket/attestation that the account was removed and service accounts audited. The primary risk of incomplete implementation is lingering access and data exfiltration; incomplete logging or manual-only processes will usually fail CMMC/NIST evidence requirements due to lack of reproducibility and timeliness.

Summary: to meet PS.L2-3.9.2 you should build an HR-anchored, API-driven deprovisioning pipeline that disables on‑prem AD accounts, revokes IDP/MFA sessions and methods, and deactivates cloud access keys and roles β€” all executed by a secured orchestration component, logged immutably, and validated via regular tests and audits. Start small (critical systems first), use SCIM/IGAs where possible, and document every API and playbook to satisfy both security needs and compliance evidence requirements.

 

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