Subscribe to the Non-Human & AI Identity Journal
Home FAQ Governance, Ownership & Risk How do security teams know if directory cleanup…
Governance, Ownership & Risk

How do security teams know if directory cleanup is actually working?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated June 6, 2026 Domain: Governance, Ownership & Risk

Directory cleanup is working only when teams can prove three things: every identity has an owner, every dependency is mapped, and every high-risk account is reviewed against real usage rather than directory status alone. If cleanup removes accounts without dependency evidence, the programme is creating operational risk instead of reducing it.

Why This Matters for Security Teams

Directory cleanup often looks successful on paper because the headcount drops, dormant accounts are disabled, or a sync job completes without error. That is not enough. For NHI governance, the real question is whether the directory still reflects operational reality: who owns each identity, what systems depend on it, and whether the account is still being used by a workload, integration, or third party. NHI Management Group guidance in the Ultimate Guide to NHIs shows why this matters, especially where NHIs are over-privileged or poorly observed. NIST’s NIST Cybersecurity Framework 2.0 reinforces the same principle: asset visibility and access governance only work when decisions are tied to reliable inventory and accountability, not directory status alone. The operational risk is simple: deletion without dependency evidence can break production paths, while retention without review leaves exposed identities in place. In practice, many security teams discover cleanup failures only after an API integration, batch job, or automation pipeline fails unexpectedly, rather than through intentional validation.

How It Works in Practice

A cleanup programme is working when it can prove a repeatable chain of evidence. First, each NHI or service account must have a named owner and a business purpose. Second, the team should map where the identity is referenced: code, CI/CD pipelines, vaults, SaaS connectors, and machine-to-machine trust chains. Third, high-risk identities should be reviewed against runtime activity, not just last login or directory age. That last point matters because a stale directory record can still back a live process through cached tokens, scheduled jobs, or a downstream vendor integration. A practical validation model usually includes:
  • inventory reconciliation between the directory, secret stores, and workload logs
  • dependency testing before disablement, with rollback steps documented
  • approval from the system owner, not only the IAM administrator
  • post-change monitoring for failed authentications, job errors, and orphaned references
The Ultimate Guide to NHIs highlights the scale of the problem, including the fact that only 5.7% of organisations have full visibility into their service accounts, which means cleanup often starts from incomplete evidence. NIST CSF 2.0 can be used to structure the control objective around Identify, Protect, and Detect, while the NIST Cybersecurity Framework 2.0 helps translate that into measurable governance and monitoring expectations. These controls tend to break down when identities are embedded in legacy scripts, unmanaged vendor tools, or long-lived automation that has no clear owner because the directory cannot reveal those hidden dependencies on its own.

Common Variations and Edge Cases

Tighter cleanup often increases coordination overhead, requiring organisations to balance reduced identity sprawl against change risk and operational delay. That tradeoff becomes sharper in hybrid estates, where a service account may exist in Active Directory, a vault, a SaaS app, and a pipeline all at once. Best practice is evolving here: there is no universal standard for the exact proof threshold that should justify disablement, so many teams use tiered confidence levels rather than a single yes-or-no rule. Edge cases matter. A human-owned account may appear unused because the owner is on leave, while an automation account may appear active only during month-end processing. Some identities are also intentionally quiet, such as break-glass accounts or JIT-provisioned credentials, and those should be judged against policy design, not typical usage patterns. The best indicator of successful cleanup is not the number of deletions; it is the number of reversals caused by missing dependency mapping, and that should trend toward zero over time. NHI Management Group’s Ultimate Guide to NHIs is clear that lifecycle control, rotation discipline, and offboarding quality all have to move together. When they do not, directory cleanup becomes a one-time purge instead of a durable control. For teams aligning this work to broader governance, NIST Cybersecurity Framework 2.0 remains the most practical way to anchor measurable review, remediation, and monitoring outcomes.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-04Covers ownership and lifecycle validation for non-human identities.
NIST CSF 2.0ID.AM-1Asset inventory is essential to proving whether cleanup reduced real exposure.
NIST Zero Trust (SP 800-207)SI.CMZero trust depends on continuous validation after access or identity changes.

Require every account to have an owner, purpose, and verified dependency map before cleanup.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on June 6, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org