Subscribe to the Non-Human & AI Identity Journal

How should security teams govern AI agents that use OAuth access?

Security teams should inventory each agent, limit scopes to the minimum required, assign an owner, and monitor its behaviour continuously. They should also define revocation steps before an incident occurs, because delegated OAuth access can become a lateral-movement path when an agent is compromised. Governance should cover discovery, approval, review, and offboarding as a single control loop.

Why This Matters for Security Teams

OAuth makes delegation convenient, but convenience becomes risk when the delegate is an autonomous agent rather than a person. An AI agent can chain tools, follow prompts, and keep acting after its original task changes, so the main control problem is not just permission size but behavioural drift. That is why current guidance increasingly treats agent governance as a runtime control issue, not a one-time onboarding checklist. The OWASP NHI Top 10 and the OWASP Agentic AI Top 10 both reflect this shift toward runtime risk management, while NIST AI Risk Management Framework reinforces accountability and continuous measurement.

OAuth token exposure also tends to be invisible until an incident forces discovery. NHIMG research shows that 85% of organisations lack full visibility into third-party vendors connected via OAuth apps, which is a useful proxy for how easily delegated access becomes unowned. That gap matters even more for agents because the owner may assume the token is “just for automation” while the agent is already moving data or invoking downstream systems. In practice, many security teams encounter the misuse of delegated OAuth after the agent has already crossed from intended assistance into unintended access.

How It Works in Practice

Security teams should govern OAuth-enabled agents as Non-Human Identities with a human owner, an explicit purpose, and a narrow runtime envelope. Static RBAC is often too blunt for autonomous workloads because an agent’s actions are contextual and task-driven, not fixed to a predictable job description. Better practice is to combine least privilege with intent-based authorisation, where policy is evaluated at request time based on what the agent is trying to do, what data it is touching, and whether the action matches the declared task.

That usually means issuing JIT credentials or short-lived OAuth grants per task, then revoking them automatically when the task ends. Where possible, anchor the agent to workload identity rather than only to bearer secrets. Standards like NIST Cybersecurity Framework 2.0 and implementation patterns from SPIFFE/SPIRE help teams separate identity proof from standing access. For operational control, teams should define:

  • an approval step before the agent receives any OAuth scope beyond read-only defaults
  • a documented owner for every agent, including offboarding responsibility
  • policy-as-code checks for request time, scope, destination, and data class
  • continuous logging for token use, tool chaining, and unusual downstream access
  • a revocation playbook that disables refresh tokens, not just the active session

NHIMG’s analysis of the Salesloft OAuth token breach and the Moltbook AI agent keys breach shows why bearer tokens and long-lived secrets are dangerous when the workload can act on its own. These controls tend to break down when agents are allowed to reuse standing refresh tokens across multiple tools, because revocation and attribution become too slow to contain the blast radius.

Common Variations and Edge Cases

Tighter OAuth governance often increases friction for product teams and automation owners, so organisations have to balance developer velocity against blast-radius reduction. There is no universal standard for every agent pattern yet, especially where agents need to maintain state across long-running tasks or call external SaaS systems with limited token lifecycle options. In those cases, current guidance suggests treating long-lived access as an exception that requires compensating controls, not as the default design.

One common edge case is delegated access inside multi-agent workflows. If one agent can call another, scope inheritance can silently expand beyond the original approval. Another is vendor-hosted agents where the organisation cannot inspect the internal reasoning loop. In those environments, security teams should insist on narrow scopes, external monitoring, and contractual disclosure of token handling. The OWASP Agentic Applications Top 10 and NIST AI Risk Management Framework both support this risk-based approach, but best practice is still evolving for fully autonomous tool use. Where agent actions must be durable, teams should avoid static broad OAuth grants and instead pair time-bound credentials with continuous attestation and rapid revocation. In the real world, the hardest failures happen when an agent is assumed to be “just another service account” even though its behaviour is adaptive and its permissions can outlive the task that created them.

Standards & Framework Alignment

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

OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 null Agentic controls address autonomous OAuth misuse and runtime scope drift.
CSA MAESTRO null MAESTRO covers governance for autonomous agents, including ownership and oversight.
NIST AI RMF null AI RMF provides governance and measurement for autonomous agent behaviour.

Apply AI RMF GOVERN and MEASURE practices to document purpose, monitor actions, and revoke when drift appears.

Related resources from NHI Mgmt Group