Explainer
Understanding OAuth On-Behalf-Of: The OBO Token Exchange Flow Explained
How agents act on behalf of users
The Problem
AI Agents Break OAuth's Assumptions
Traditional App
๐คโAppโ๐
App forwards user intent
AI Agent
๐คโ๐คโ???
Agent creates its own intent
When an agent approves an expense, the audit log shows “alice@company.com” โ but Alice didn’t decide. Who’s accountable?
The Solution
Dual Identity with RFC 8693
๐ค
sub = authority (whose permissions)
๐ค
act = actor (who's deciding)The On-Behalf-Of token identifies both. APIs can enforce Alice’s limits while logging the agent’s actions. Full accountability.
Try It
Token Exchange Flow
Sequence Diagram
Alice's Token
โ
OBO Token
โ
The Difference
Audit Log Comparison
Same expense approval. What does the audit log show?
Stakeholder Benefits
Who Benefits?
๐ก๏ธ
CISO
"Agent compromised. What did it access?"
Query
actor: agent-001 โ instant forensic trail across all users.
๐
Compliance
"Who approved this $10K expense?"
Alice (authority) + agent-001 (actor). Both logged. Full accountability.
โ๏ธ
Platform
"Which agents are misbehaving?"
Per-agent metrics. Spot anomalies. Rate limit or revoke specific agents.
๐ค
AI Team
"Is agent v2 making better decisions?"
Compare rejection rates per agent version. A/B test with real audit data.
Limitations
Where OBO Falls Short
OBO works within a single trust domain. It breaks down when:
Multi-Hop Delegation
Agent A calls Agent B calls Agent C. The
act claim only captures one layer. Who's really acting?Cross-Organization
Agent from Org A needs to call API in Org B. Different auth servers, no shared trust anchor.
User Consent Opacity
RFC 8693 is backend-only. The user consents to the initial token, but every exchange after that is invisible. No front-channel interaction, no visibility into what scopes the agent requests or which downstream services receive tokens.
Emerging fix: IETF draft-oauth-ai-agents-on-behalf-of-user adds front-channel consent for AI agent delegation.
For emerging solutions to these challenges, see my blog post.
Learn More
BLOG
AI Agents Beyond PoCs: IAM Emerging Patterns
Deep dive on OBO, agent identity, and the accountability problem
EXPLAINER
MCP (Model Context Protocol)
How agents connect to tools and data
EXPLAINER
A2A (Agent-to-Agent Protocol)
How agents talk to each other
RFC 8693: OAuth 2.0 Token Exchange
The official IETF specification