Delegate a client's identity through two AI agents with a cryptographically chained act trail (Okta EA)
Client phase. The flow starts with a subject token that represents the client identity — a user (via login) or a service (via client credentials). This token is the identity that will be delegated through both agents.
Get the token that represents the client identity. Log a user in (Auth Code + PKCE — login always uses openid profile email), authenticate a service with client credentials, or pick an existing token from the wallet.
/oauth2/default/v1/authorize
resource param support depends on org configuration; included in request when backend supports it
Agent 1 phase. The client hands its token to Agent 1, which adds itself to the delegation chain: it exchanges the subject token for an Identity JWT Authorization Grant (ID-JAG) signed proof, then redeems that grant for its own access token. The resulting token carries act.sub = Agent 1.
Agent 1 exchanges the subject token for an Identity JWT Authorization Grant via RFC 8693 Token Exchange at the org authorization server, authenticating with a JWT client assertion signed by Agent 1's private key.
/oauth2/v1/token
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
Agent 1 presents the ID-JAG as a JWT Bearer assertion (RFC 7523) to the custom authorization server and receives its delegated access token. The ID-JAG is short-lived (5 minutes).
/oauth2/{authServerId}/v1/token
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Agent 2 phase. Agent 1 now delegates to Agent 2 the same way: Agent 2 exchanges Agent 1's access token for a new ID-JAG signed with Agent 2's key, then redeems it. The act chain grows to Client → Agent 1 → Agent 2, nested cryptographically inside the token.
Agent 2 exchanges Agent 1's access token (T3) for a new Identity JWT Authorization Grant at the org authorization server, authenticating with a JWT client assertion signed by Agent 2's private key.
/oauth2/v1/token
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
Agent 2 presents its ID-JAG as a JWT Bearer assertion (RFC 7523) to the custom authorization server and receives the final delegated access token carrying the full act chain.
/oauth2/{authServerId}/v1/token
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Resource phase. Agent 2 calls the downstream API with the final token (T5). The resource server can verify the entire delegation trail — who the subject is and exactly which agents acted on its behalf — straight from the token's nested act claims.
Test the final access token (T5) by making an authenticated API request to a resource server.