Join our Newsletter — 33% off our NHI Course
Home› Guides› Audit Readiness for AI Agents and NHIs: Evidence…
Guide Audit, Assurance & Compliance

Audit Readiness for AI Agents and NHIs: Evidence for SOC 2 and ISO 27001

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 13 min read
On this page

Auditors now sample service accounts, API keys and AI agents when they test logical access, and most organisations cannot produce the evidence that shows those identities are inventoried, owned, reviewed and removed. SOC 2 examinations test the Common Criteria for logical access (the CC6 series) and monitoring (CC7), and ISO/IEC 27001:2022 certification audits test Annex A controls such as A.5.15 to A.5.18 and A.8.2. Neither framework has a separate rulebook for non-human identities (NHIs), so the auditor applies the same criteria to machine identities that you apply to people. This guide shows which evidence satisfies each control for NHIs and agents, how to generate it from cloud and identity platforms, and where audits usually find exceptions. It is for GRC leads, identity teams and engineering managers preparing for a SOC 2 Type 2 period or an ISO/IEC 27001 surveillance or recertification audit. It builds on the Access Reviews Guide and does not repeat review design.

Key takeaways

  • Same criteria, different population: CC6.1 to CC6.3 and A.5.15 to A.5.18 apply to every identity with access, so your access control description must say how machine identities are handled or the auditor will treat them as out of control.
  • Completeness is the first test: an auditor samples from a population you provide; if the NHI inventory is incomplete, every later control is untested for the missing identities.
  • Ownership turns machines into reviewable items: a service account or agent without a named human owner cannot be reviewed, approved or removed in a way an auditor can rely on.
  • System-generated evidence wins: credential reports, sign-in logs and vault audit logs exported with timestamps beat screenshots and spreadsheets assembled the week before fieldwork.
  • AI agents add two questions: who authorised what the agent can do, and can every agent action be traced back to the agent identity and its owner.

What auditors are actually testing

A SOC 2 report is a CPA's opinion on whether controls described by management were suitably designed (Type 1) and also operated effectively over a period (Type 2), measured against the AICPA's 2017 Trust Services Criteria (with revised points of focus, 2022). ISO/IEC 27001:2022 certification tests whether the information security management system meets the standard's clauses and whether the Annex A controls you selected in the Statement of Applicability are implemented. The table below lists the criteria where NHIs and agents usually surface. Criterion topics are paraphrased: read the AICPA and ISO texts for the authoritative wording.

AreaSOC 2 Common Criteria (topic)ISO/IEC 27001:2022 Annex ANHI and agent question the auditor asks
InventoryCC6.1 logical access over protected information assets (includes identifying assets)A.5.9 inventory of information and other associated assetsShow me the complete list of service accounts, keys, certificates and agents in scope
Identity lifecycleCC6.2 registration and authorisation before credentials are issued; removal when no longer neededA.5.16 identity managementWho approved this service account or agent, and when was it created
AuthenticationCC6.1 authentication of users and systems; credential managementA.5.17 authentication information; A.8.5 secure authenticationWhere is the secret stored, how old is it, who can read it
Authorisation and least privilegeCC6.3 access granted, modified and removed based on roles, least privilege, segregation of dutiesA.5.15 access control; A.5.18 access rights; A.8.2 privileged access rightsWhy does this identity have these permissions, and when were they last reviewed
External access and integrationsCC6.6 logical access from outside system boundariesA.5.19 to A.5.22 supplier relationshipsWhich third parties hold keys or OAuth grants into your systems
MonitoringCC7.2 monitoring system components for anomaliesA.8.15 logging; A.8.16 monitoring activitiesShow me that machine authentication and agent actions are logged and alerts are reviewed
ChangeCC8.1 changes authorised, tested and approvedA.8.32 change managementWho changed this agent's tools or this pipeline's role, and was it approved
VendorsCC9.2 vendor and business partner riskA.5.19, A.5.21 ICT supply chainHow do you assess the AI platform or SaaS vendor that holds your tokens

The evidence pack: what to produce for each control

Build one evidence pack for the audit period, with each item system-generated where possible, dated and traceable to its source. The aim is that the auditor can select a sample and you can produce the supporting record for every item without manual reconstruction.

ControlPrimary evidenceHow to generate itCommon exception
NHI inventory (population)Export of all service accounts, workload identities, API keys, OAuth apps, certificates and AI agents, with owner, system, purpose, environment, created dateCloud IAM listings, IdP service principal and app registration exports, vault inventory, secrets scanner results, agent platform registry, reconciled into one listPopulation built from one source only, missing SaaS integrations and agents
OwnershipOwner field populated for each item, plus owner attestation recordsInventory export with owner, attestation campaign resultsOwner is a team alias or a leaver
Provisioning approvalTicket or pull request approving each new NHI or agent created in the periodChange system linked to IaC commits or IdP audit eventsIdentities created by scripts with no approval trail
Credential managementCredential age report; list of static secrets with documented exceptions; vault access policyAWS IAM credential report, cloud key listings, vault audit logKeys older than policy allows with no exception record
Access reviewCompleted review of NHIs and agents with decisions, reviewer, date, and revocations executedIGA campaign export or signed review workbook with system evidence of removalsReviews approved without permission or usage data
RemovalDeprovisioning records for NHIs whose purpose ended in the periodDecommission tickets matched to deletion or disable eventsDisabled account still holds active keys or tokens
MonitoringLog source list including machine sign-ins; alert rules; sample of reviewed alertsSIEM configuration export, alert ticketsService principal sign-ins not collected
Agent authorisationAgent register with tools, data scopes, autonomy level and approverAgent platform configuration export and approval recordsAgents running on a human's credentials or a shared key

Platform sources worth knowing

  • AWS: the IAM credential report is a CSV listing every IAM user with access_key_1_last_rotated, access_key_1_last_used_date, mfa_active and related columns. It can be generated at most once every four hours and covers only the first two access keys per user, so use ListAccessKeys for completeness. Generating and downloading it needs iam:GenerateCredentialReport and iam:GetCredentialReport. IAM roles are not in the report and need their own listing.
  • Microsoft Entra ID: sign-in logs separate interactive user, non-interactive user, service principal and managed identity sign-ins. Export the service principal and managed identity logs to your SIEM, because the default retention is limited and auditors may ask for the whole period.
  • Google Cloud: the metrics iam.googleapis.com/service_account/authn_events_count and iam.googleapis.com/service_account/key/authn_events_count show account and key usage, Activity Analyzer shows the latest authentication, and service account insights flag accounts unused for 90 days. Cloud Monitoring keeps these metrics for six weeks, so export to BigQuery for a 12-month audit period. HMAC keys and API keys bound to service accounts are not shown in these metrics.
  • Vaults and secrets managers: audit logs of secret reads and policy changes show who and what accessed each credential. See the Secrets Management Guide.

Defining the population: scoping NHIs and agents

Auditors test samples drawn from a population. If the population is wrong, sampling is meaningless, and a good auditor will test completeness by comparing your list with an independent source, such as cloud IAM listings or an IdP export.

  1. Define what counts: service accounts, IAM roles used by workloads, managed identities and workload identities, API keys, OAuth client credentials and app registrations, personal access tokens used by automation, SSH keys and certificates used by machines, CI/CD tokens, and AI agents with their own credentials.
  2. Align with system boundaries: the SOC 2 system description and the ISO/IEC 27001 scope statement decide which environments are in scope. List NHIs for those environments, and note where an out-of-scope identity can still reach in-scope data.
  3. Reconcile sources: merge cloud, IdP, vault, CI/CD and SaaS sources on a stable identifier. Record the reconciliation date and method so the auditor can repeat it.
  4. Freeze and timestamp: produce the population as of a stated date for the period, and keep the query or export job that created it.

The Service Account Inventory Template gives a field list, and the NHI Ownership Guide covers owner assignment.

AI agents: the extra evidence

An AI agent with its own credentials is an NHI, and the controls above apply. Agents add two audit concerns: the scope of what they can do is often configured in a platform rather than in IAM, and their actions can be hard to attribute. Expect auditors to ask:

  • Authorisation: who approved the agent, its tools, its data sources and its autonomy level. Keep an agent register with an approver and date, and treat changes to tools or scopes as changes under CC8.1 and A.8.32.
  • Identity: whether the agent has its own identity rather than a human's session or a shared key. See the Agent Identity and Access Guide.
  • Attribution: whether logs link each agent action to the agent identity, the human or process that invoked it, and the resource touched. See the AI Agent Audit Trails for Regulators Guide.
  • Human approval: where high-impact actions need approval, show the approval records for a sample. See the Human-in-the-Loop for AI Agents Guide.
  • Vendor assurance: for hosted agent platforms and model providers, obtain their SOC 2 report or ISO/IEC 27001 certificate, read the complementary user entity controls, and show you implemented them.

Preparing for the audit: a phased approach

  1. Six months before the period starts (or now): agree the NHI and agent definition with the auditor. Update the system description or Statement of Applicability so it states how machine identities are controlled. Unclear scope is cheaper to fix before the period than during fieldwork.
  2. Build the population: reconcile sources, fill owners, and remove obviously dead identities before the period begins, so the auditor does not test them.
  3. Write the control: describe frequency, owner, evidence and threshold, for example "NHI owners review permissions and credential age quarterly; credentials older than 90 days require a documented exception".
  4. Dry run: pick 25 NHIs at random and try to produce every evidence item for each. Every gap you find here is an exception you avoid later.
  5. Operate and collect: run reviews on schedule, keep exports with timestamps, and store them in a single evidence location with retention for the full period.
  6. Handle exceptions honestly: if a control failed, record the remediation and its date. Auditors treat a documented, remediated exception better than one discovered in testing.
  7. After the report: read the exceptions and management responses, then fix the root cause before the next period. Continuous monitoring reduces the scramble: see the Audit Evidence and Continuous Controls Monitoring Guide.

Small versus large organisations

  • Startups on a first SOC 2: a single cloud account and IdP often hold most NHIs. A reconciled spreadsheet with owners, a quarterly review recorded in tickets, and the cloud credential reports can be enough. Do not over-engineer, but do include the CI/CD tokens and SaaS integrations.
  • Large enterprises: NHIs can number in the tens of thousands across many platforms. Use IGA or NHI tooling to generate the population, risk-tier the identities, and review privileged and externally reachable identities more often than low-risk ones. Agree the risk-tiering method with the auditor in advance.

Detection and measurement

  • Population completeness: identities found by independent discovery that are missing from the inventory, target zero.
  • Ownership coverage: percentage of NHIs and agents with a current, named human owner.
  • Credential age compliance: percentage of credentials within the rotation policy or covered by a documented exception.
  • Review revocation rate: share of NHI entitlements removed per review, which shows the review is real.
  • Dormant identity count: identities unused for 90 days or more, trending down.
  • Evidence lead time: time to produce the full evidence set for a sample of 25 NHIs.

Framework mapping

Control objectiveNIST CSF 2.0NIST SP 800-53 r5ISO/IEC 27001:2022 Annex A
Identities and credentials for services managedPR.AA-01IA-4, IA-5A.5.16, A.5.17
Access permissions defined, managed and reviewedPR.AA-05AC-2, AC-6A.5.15, A.5.18, A.8.2
Disable accounts no longer neededPR.AA-05AC-2(3)A.5.18
Logging and review of machine activityPR.PS-04, DE.CM-01AU-2, AU-6A.8.15, A.8.16
Continuous monitoring of control operationGV.OV-01CA-7Clause 9.1 monitoring, measurement, analysis and evaluation
Third-party access and vendor assuranceGV.SC-01SR-3A.5.19 to A.5.22

Common failure patterns

  • Population from one system: the inventory lists IdP service principals but misses cloud keys, CI/CD tokens and SaaS integrations, and the auditor's completeness check finds them.
  • Exempting service accounts from reviews: human reviews pass while the most privileged identities are never reviewed, producing a qualified opinion or nonconformity on access control.
  • Support and admin service accounts with reach into customer data: in the Okta support system breach, a stolen support service account credential gave access to support case files from 134 customers, some holding live session tokens. An audit that samples such accounts should ask where their credentials live and who can use them.
  • Stale credentials without exceptions: keys older than policy with no documented exception are an easy exception for the auditor and a real risk. The Snowflake breach involved credentials that had not been rotated for years.
  • Agents on borrowed identities: an agent acting with a developer's token makes approval, review and attribution impossible to evidence.
  • Screenshot evidence: undated screenshots taken at fieldwork time do not show operation across a Type 2 period.

Practitioner checklist

  • Agree the definition and scope of NHIs and AI agents with the auditor before the period starts.
  • State in the system description or Statement of Applicability how machine identities are controlled.
  • Build a reconciled, timestamped NHI and agent population with owners.
  • Write controls with frequency, owner, evidence and thresholds for credential age and review.
  • Export credential reports, sign-in logs and vault audit logs on a schedule and retain them for the full period.
  • Run NHI and agent reviews with usage and permission data, and verify revocations.
  • Keep an agent register with tools, scopes, autonomy level and approver.
  • Dry-run a 25-item sample before fieldwork and fix gaps.
  • Collect vendor SOC 2 reports and implement their complementary user entity controls.

Standards and references

Related NHI Mgmt Group resources: Access Reviews Guide · SOC 2 Guide · ISO 27001 Certification Guide · Identity Governance for AI Agents Guide · Non-Human Identity (NHI) Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.