Skip to content
Free · Scenario lab

Delegated Agent OAuth Lab: Act for a User, No Password

This is a hands-on lab about letting an AI agent act for a user without handing it the user’s password or a master key. The agent should hold a narrow, expiring token that names the service it is for, that you can see and that you can revoke. You make 12 scored calls on the flow, scope, lifetime, audience, binding, token exchange, consent and revocation.

The scenario is fictional. The rules come from the OAuth RFCs, the OAuth security best current practice and the MCP authorization draft, listed below. For a general tour of OAuth grants, see the OAuth Flow Lab.

No download, no card
Template & sample scenario. A fictional rehearsal built on common real-world patterns, not a record of any real organisation, audit or deal. Generated from a PlayCISO template as a starting point: it is not legal, audit, certification, investment or professional advice. Review, adapt and validate it for your organisation before you rely on it.

You are Marcus Oyelaran, identity architect at Fernbank Energy. Your AI assistant Scout must read and draft email and book meetings for staff, and it calls a calendar service that in turn calls a directory service. You must let it act for a user without ever holding that user's password or a master key. Over 12 scored decisions you choose the flow, scope, lifetime, audience, binding, token exchange, refresh handling, consent screen and revocation. Everything is invented. Each call scores 0 to 10 with the source behind the feedback.

Make it yours

Replace the sample names so the scenario and the debrief you export are about your organisation.

TL;DR

What this is

5 points
  • A scenario lab about how an AI agent acts for a user without holding the user's password or a master key. You act as identity architect at a fictional company.
  • You make 12 scored decisions: why passwords and static API keys fail, the authorization code flow with PKCE, narrow scopes, token lifetime, audience restriction with resource indicators (RFC 8707), sender-constrained tokens (DPoP, RFC 9449), refresh-token handling, token exchange for downstream calls (RFC 8693), the "act" claim, the consent screen, revocation and introspection, and what OAuth does not fix.
  • It draws on the RFCs themselves, the OAuth security best current practice (RFC 9700), the MCP authorization draft, the MCP security best practices and OWASP guidance on excessive agency. The OAuth 2.1 document is an Internet-Draft and is labelled as one.
  • Free to play, no account needed. Every name is invented. No attack steps appear and no real token or host is shown.
  • Defensive and educational only.

How this differs from our other agent labs

The OAuth Flow Lab is a general OAuth lab: pick the right grant for each kind of app. This lab assumes you know the code flow and asks the agent-specific questions after it: how narrow, how long, which audience, bound to what key, what happens on a downstream hop, and how you stop it. The OAuth Consent Lab is about reviewing other apps’ consent requests; here you design your own agent’s.

The Agent Credential Broker Lab is about where credentials live once issued; this one is about what gets issued and to whom. The Agent Task Permission Scoper helps you decide the minimum permissions for one task, and the MCP Proxy Policy Lab covers the gateway that checks those tokens on MCP traffic.

Frequently asked questions

How should an AI agent act on behalf of a user?

Through delegated authorisation, not the user's credentials. The user signs in at the authorization server, approves specific permissions, and the agent receives a token limited to them. RFC 9700 says the password grant must not be used because it exposes the user's credentials to the client. The lab takes you through the choices that follow: flow, scope, lifetime, audience, binding, refresh, downstream calls and revocation.

What is the difference between delegation and impersonation in token exchange?

RFC 8693 explains that with impersonation, the acting party is indistinguishable from the user in the token's context; with delegation, the actor keeps its own identity and it is understood that it acts for the user. The "act" claim expresses that delegation has occurred and names the actor. For agents, delegation keeps a record that software, not the person, did the thing.

Why audience-restrict an agent's token?

So a token stolen from or sent to one service cannot be used at another. RFC 8707 lets the client name the resource it will use the token at, so the authorization server can restrict the audience, and RFC 9700 says each resource server must verify the token was meant for it. The MCP authorization draft requires the resource parameter, and the MCP security best practices forbid accepting tokens not issued for the server.

Does DPoP make a stolen token useless?

Only if the thief cannot also use the key. RFC 9449 sender-constrains tokens so that a token without the matching private key is rejected, in contrast to a bearer token that any holder can use. If the key sits in the same compromised sandbox, the benefit shrinks, so key placement matters.

How do you revoke an agent's access?

Revoke the grant at the authorization server. RFC 7009 says a revocation request invalidates the token and, where applicable, other tokens based on the same authorization grant. Short-lived access tokens limit how long offline checks keep accepting an old one, and token introspection (RFC 7662) lets a resource server ask whether a token is currently active.

Is OAuth 2.1 a standard yet?

No. At our access date it is an Internet-Draft (draft-ietf-oauth-v2-1-17, dated 31 October 2026, expiring 4 May 2027). RFC 9700 is the published best current practice, and the lab cites the RFCs for requirements.

What does this lab say about NIST SP 800-63C?

Only that it exists and what it covers: identity federation and assertions for people. It is background for the idea of one party vouching for an identity to another, and it does not set rules for AI agents, so the lab does not use it to justify agent design choices.

Is the scenario based on a real incident?

No. The organisation, assistant and services are invented. The lab quotes no real token, host or lifetime. Standards cited do not give token lifetimes in minutes, so the lab does not either.

How is the lab scored?

Each of the 12 decisions scores 0 to 10 and the result is your share of the maximum, with a short band saying what it means. The debrief shows the source behind each rationale. Lines labelled PlayCISO practice are our reasoning, not a statement by a source.

Sources

All read on 4 November 2026. Lines in the feedback marked “PlayCISO practice” are our own reasoning, not a statement by any source. The scenarios are fictional. We cite primary sources, not vendor advisories, and say where a page could not be fully read.

The tools people use most on PlayCISO.

All tools
🖤 Black Friday: new customers get 3 months of Pro for $5, then $5/month. Ends 30 Nov. Claim 3 months for $5 →