SMART WORLDJOURNALSubmit Manuscript
← All technology news

Artificial Intelligence

Amazon Cognito Adds OAuth 2.0 Token Exchange to Delegate User Access to AI Agents

Amazon Cognito now supports OAuth 2.0 Token Exchange (RFC 8693), enabling secure delegation of user access to AI agents and downstream services. This new feature allows multi-hop API calls to maintain user identity and scope restrictions, improving security in complex service interactions involving AI.

NEWS

Amazon Web Services has introduced support for OAuth 2.0 Token Exchange within Amazon Cognito user pools, addressing challenges in delegating user authorization across multiple service hops. This capability is particularly relevant for AI-driven applications where AI agents invoke downstream APIs on users’ behalf.

In traditional OAuth 2.0 workflows, an application receives a short-lived access token representing a user, limited to permissions (scopes) granted by the user. However, when the application delegates tasks to downstream services, forwarding this token either obscures the service’s identity or loses user context, complicating authorization and auditing.

Token Exchange solves this by allowing a downstream service to present the user’s access token (subject token) along with its own credentials (actor token) to the authorization server (Amazon Cognito). Cognito then issues a new access token tailored for the downstream resource API, containing the user’s identity and the calling service’s identity, while adhering to scopes consented by the user.

Two patterns are distinguished: impersonation, where the downstream service acts solely as a proxy for the user without identifying itself, and delegation, where the downstream service identifies itself explicitly in the token. AI agents typically require delegation to ensure both user and agent identities are visible for authorization and audit purposes.

The implementation supports multiple use cases, such as a shared intermediary (e.g., Model Context Protocol server) that performs token exchanges on behalf of various agents, or AI agents running within Amazon Bedrock AgentCore Runtime that individually request token exchanges. These mechanisms prevent scope escalation and ensure tokens carry minimum necessary permissions.

Security checks by Cognito during token exchange include validation of token signatures, expiry, revocation status, and user pool status. It also restricts the issued token’s scopes to those allowed in the user’s original token and the app client’s permissions, and no refresh tokens are issued during exchanges.

AWS documents detailed steps for enabling the feature in Cognito user pools, configuring app clients for delegation and impersonation flows, and integrating with AI agent workflows. The feature bolsters security and transparency in complex API call chains involving autonomous AI agents acting on user behalf.

While Token Exchange enables granular delegation and identity preservation across services, it relies on proper configuration of trust relationships and scope restrictions. The downstream resource server must still perform token verification and authorization based on token claims to maintain security.

Source & further reading

Delegate user access to AI agents with Amazon Cognito token exchange ↗

Source published 2026-11-24. Claims and limitations should be checked against the original announcement or research.