OAuth Token Exchange for Agents
How can an agent call another service while preserving who it represents?
Reference notes by Min · Reviewed October 15, 2026
Definition
OAuth token exchange is a protocol for obtaining a security token from an authorization server using an existing token and, optionally, information about an acting party. An agent deployment can use it to obtain credentials appropriate for a downstream service.
The distinction matters when the same user request crosses several services. A downstream system needs to know which principal is represented and which service is actually acting. An identity design that collapses those roles can make later investigation difficult, even when the business task itself was legitimate.
What it covers
- Subject
- The party on whose behalf access is requested.
- Actor
- The software or service acting for that subject.
- Target
- The audience or resource for the requested credential.
- Policy
- The server’s decision about whether and what to issue.
Do not assume the protocol carries all business restrictions. A token may identify a service audience and permission scope while the order identifier, approval status and task expiry are checked elsewhere. Write down which system enforces each restriction and what happens if the task context is absent.
In practice
Practical design patterns by Min.
- Document whether downstream access uses delegation or impersonation semantics.
- Request only the target service and operations needed for the current task.
- Verify that downstream services validate token issuer, audience, validity and permissions.
- Connect issuance and use records to the task without logging token contents.
Start with one concrete service integration and inspect the credentials it can issue and accept. A successful exchange only demonstrates that the authorization server issued a token under its policy. Confirm separately that a different order, an expired task and an unapproved write operation are rejected.
Research notes
Source-grounded details and editorial applications. Follow each link for the original document.
Delegation preserves the actor distinction
RFC 8693 section 1.1 distinguishes delegation from impersonation. Its subject_token and optional actor_token parameters support these relationships; the authorization server decides whether to issue a composite token.
Source: IETF RFC 8693: OAuth 2.0 Token Exchange, sections 1.1, 2 and 4.1 ↗
Exchange has a deliberately limited scope
The RFC leaves deployment trust models and many token characteristics outside its scope. A valid token exchange therefore does not establish that an agent has received appropriate business authority.
Source: IETF RFC 8693: OAuth 2.0 Token Exchange, sections 1.1, 2 and 4.1 ↗
Working example
A support agent consults an order service
A support employee asks an agent to investigate a specific delayed order.
- Authenticate the employee and the agent through the supported identity flow.
- Request a downstream credential that the order service accepts for the permitted investigation.
- Enforce order ownership and task restrictions at the service, and require a new decision before issuing a refund.
Why the controls matter
Reading the shipping record and refunding the customer are different operations. The agent may finish the investigation using read access, then produce a proposed refund that enters a separate approval path. This keeps a useful investigation from becoming an unrestricted financial delegation.
Common pitfalls
- Assuming exchange automatically reduces all permissions.
- Treating a claimed delegation chain as authorization by itself.
- Passing the original broad credential to every tool when a narrower service credential is available.
Credential lifecycle behavior is implementation-dependent. Document what revoking the original grant does to already issued downstream tokens, and measure the remaining access window. Avoid claiming immediate cancellation solely because the user signed out of the initiating application.
Questions for operational review
Use these questions to decide what evidence your team needs. They are editorial prompts, not a compliance checklist.
- Can the resource distinguish the represented user from the acting service?
- Where is the individual task scope enforced?
- What invalidates downstream credentials after the original authorization ends?
Articles linking here
References
Primary documents reviewed for this entry. Examples and implementation patterns are editorial synthesis.
- IETF RFC 8693: OAuth 2.0 Token Exchange, sections 1.1, 2 and 4.1 ↗Accessed October 15, 2026
- NIST SP 800-207: Zero Trust Architecture (2020) ↗Accessed October 15, 2026