ID-JAG
ID-JAG (Identity Assertion JWT Authorization Grant) lets an application access another service on a signed-in user's behalf. The identity provider (IdP) approves the exchange, and the target service's authorization server applies its own access policy before issuing an access token.
LiteLLM can act as both a resource and requesting app:
| Guide | Use case | What LiteLLM does |
|---|---|---|
| LiteLLM as resource app | An application needs to run inference or access MCP tools through LiteLLM. | Accepts an ID-JAG at POST /token and issues a LiteLLM credential for the user. |
| LiteLLM as requesting app | An agent using LiteLLM needs access to an MCP server with a separate authorization server. | Exchanges the user's identity assertion for an ID-JAG, then redeems it for an MCP access token. |
Use ID-JAG when an app needs to act on a signed-in user's behalf and you want your IdP to control which apps can request access. Both the IdP and the target service's authorization server must support ID-JAG.
For direct access to LiteLLM with an existing JWT, map its claims to users and teams or Virtual Keys. For other token-exchange flows with an upstream MCP server, see OBO token exchange.
How it works
The exchange involves four roles:
| Role | Responsibility |
|---|---|
| Requesting app (client) | Requests access on the user's behalf. |
| IdP authorization server | Validates the user's identity assertion and issues an ID-JAG according to its access policy. |
| Resource authorization server | Validates the ID-JAG, applies its access policy, and issues an access token. Its issuer identifier is the ID-JAG's aud claim. |
| Resource server | Accepts the access token to authorize API requests. |
Identity provider setup
Okta
Okta implements ID-JAG as Cross App Access (XAA). Register the requesting app as an AI agent and enable Cross App Access on the resource app. An administrator connects them through a resource connection and selects the allowed scopes.
Select Okta under Setup in LiteLLM as resource app or LiteLLM as requesting app for the full setup.