Skip to main content

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:

GuideUse caseWhat LiteLLM does
LiteLLM as resource appAn 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 appAn 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.
When to use ID-JAG

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:

RoleResponsibility
Requesting app (client)Requests access on the user's behalf.
IdP authorization serverValidates the user's identity assertion and issues an ID-JAG according to its access policy.
Resource authorization serverValidates the ID-JAG, applies its access policy, and issues an access token. Its issuer identifier is the ID-JAG's aud claim.
Resource serverAccepts 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.

LiteLLM Enterprise
SSO/SAML, audit logs, spend tracking, multi-team management, and guardrails, built for production.
Learn more →