LiteLLM SCIM provisioning, JWT auth and SAML SSO

Wire a self-hosted LiteLLM gateway to your identity provider so users and teams sync, requests carry IdP identity, the admin UI signs in with SAML, and virtual keys are issued deliberately.

On this page

LiteLLM SCIM provisioning, JWT auth and SAML SSO: what the integration covers

A platform or security team that has to tie gateway access to the corporate directory needs to know which mechanisms do which job before anything is configured. The integration uses three documented LiteLLM mechanisms plus virtual keys: SCIM to create and update users and teams from the identity provider (IdP), JWT authentication so that each model request carries a verified IdP identity, and SAML 2.0 so administrators can sign in to the admin UI. Virtual keys are the credentials that still have to be issued for callers. SCIM and JWT authentication are Enterprise features, so the license decision comes before the design. No custom connector is involved, which means the work is configuration, verification and operating decisions rather than software development.

Each piece has to be switched on separately. LiteLLM states that creating a user through SCIM does not mint a key, and that verifying a JWT does not create a key by itself. A directory user can therefore exist in the gateway with no way to call a model, and a valid token can be rejected or accepted without any spend tracking tied to it. The flow only works end to end when SCIM, JWT authentication and the key issuance process are each enabled and mapped to the same user and team identifiers. Teams should write down which claim carries the user ID, email and team IDs, and confirm in a test tenant which group names map to which LiteLLM teams before production users are provisioned.

The admin UI SAML setup is a separate decision from caller identity. SAML 2.0 is configured as a service provider, with SP-initiated and IdP-initiated HTTP-POST flows, either in the admin UI or through SAML_* environment variables backed by the python3-saml library. Confirm with the IdP team which flow they will use and who may hold administrator roles, because a misassigned admin group grants control over every key and budget on the gateway. The LiteLLM SAML 2.0 SSO documentation and the identity provisioning guide set out the exact steps, and the rest of this page covers each component in turn.

What you need in place before wiring LiteLLM to an identity provider

Wiring LiteLLM to an identity provider touches the license, the release line, the database, the cache, the IdP itself and the network edge. Each prerequisite below has to be settled before SCIM, JWT auth and SAML SSO can work together, and several of them change the cost and the support model.

Enterprise license for SCIM and JWT

SCIM provisioning and JWT authentication are Enterprise features. Open-source LiteLLM does not give you the full identity flow, so the license decision comes first. SSO for the admin UI is free for up to 5 users in v1.76.0 and later, and an Enterprise license is needed beyond that. Ask the vendor to confirm which features your license covers before you design the flow around them.

Enterprise docs

LiteLLM release line

The current GitHub release is v1.105.1, published October 14, 2026. LiteLLM supports the four most recent stable minor versions for both open-source and Enterprise deployments. Pick a version on that line, pin it, and record the version you tested, because SCIM and JWT behavior is tied to the release you run.

LiteLLM releases

PostgreSQL for virtual keys

Virtual keys need a PostgreSQL database. SCIM creating a user does not mint a key, and JWT verification does not create one either, so the keys that carry budgets, model access and spend are stored in PostgreSQL. Plan the database as a stateful dependency with backups and access control, and confirm who owns its schema upgrades before go-live.

Virtual keys docs

Redis 7.0 or newer

Redis 7.0 or newer becomes required once more than one proxy instance runs, because shared rate limits, router state and cache must be consistent across instances. A single-instance pilot can defer it, but the identity test plan should include a second instance, since team sync and rate limits behave differently once state is shared. Confirm the Redis topology your platform team supports.

An IdP with a JWKS or discovery URL

JWT auth needs the identity provider to publish a JWKS or OIDC discovery URL, which LiteLLM reads through JWT_PUBLIC_KEY_URL. You will also set JWT_AUDIENCE and JWT_ISSUER and map claims for user ID, email and team IDs. Confirm that your IdP issues tokens with the claims you need, and that the signing keys rotate in a way your gateway can follow.

Identity provisioning guide

Confirm SCIM support in your IdP

Before you commit to a design, confirm with your identity provider vendor that its SCIM implementation can push users and groups to LiteLLM and that group membership maps to the team structure you want. Ask about deprovisioning behavior and how team changes propagate. If you run your own IdP, Keycloak 26.8.1, published October 13, 2026, is an option, and its release cadence and upgrade approach should be part of that decision.

Keycloak project

TLS and DNS for the admin callback

SAML 2.0 SSO for the admin UI uses HTTP-POST bindings, so the admin UI needs a stable public hostname, a valid TLS certificate and DNS records that resolve for your users. The callback URL configured in the IdP must match the gateway address exactly. Plan certificate renewal and the SP metadata you will exchange with the IdP team before the pilot begins.

How SCIM, JWT auth, SAML and virtual keys fit together

The diagram starts at the identity provider, which pushes users and teams to LiteLLM through SCIM and signs admins into the admin UI over SAML 2.0 HTTP-POST. Callers present an IdP-issued token that LiteLLM checks against the JWKS endpoint, but that check does not create a key. A separate virtual key step is what grants model access, budgets and spend tracking. The dashed boundary marks the line between your network and the gateway's data stores, where you should confirm what is persisted and where.

Identity flows into the gateway, while virtual keys separately control model access and spend.

How to configure SCIM, JWT auth and SAML in the right order

This sequence takes a self-hosted LiteLLM gateway from a bare deployment to one where users and teams sync from the identity provider, callers authenticate with IdP tokens, admins sign in through SAML, and every virtual key is scoped to the models and limits it needs.

  1. Deploy the gateway and PostgreSQL with secrets held externally

    The platform team deploys the LiteLLM proxy with PostgreSQL as its database, since virtual keys need PostgreSQL, and adds Redis 7.0 or newer if more than one proxy instance will run. Set LITELLM_MASTER_KEY, which must start with sk-, from a secret manager rather than a plain config file, and run one Uvicorn worker per pod if you deploy on Kubernetes. Check that the proxy health endpoint responds and that a request made with the master key returns a model response through a test route. Only move on when that succeeds, because every later step depends on a working database and admin key.

  2. Enable Enterprise features and confirm the license scope

    SCIM and JWT authentication are Enterprise features, and SSO beyond the free user limit also requires an Enterprise license. Your procurement or license owner should confirm the license terms in writing before the IdP work starts, and confirm which edition covers SAML for the admin UI in your version. Once the license key is loaded, check the admin UI or the license status endpoint to confirm the Enterprise features are active. If they are not, stop here, because the later steps will appear to work but will fail at the first SCIM or JWT call.

  3. Create the IdP client and map claims

    In your identity provider, create a client or application for LiteLLM and record the issuer URL, audience value, and JWKS or OIDC discovery URL. Decide which token claims carry the user ID, email and team IDs, and map groups to the teams you plan to use in LiteLLM. Issue a test token for a known user and decode it to confirm the claims exist with the names you intend to map. Record which claim is the stable subject identifier, because LiteLLM will key users on it. The check is a decoded token that shows the expected subject, email and group values for a test user.

  4. Enable SCIM and confirm users and teams sync

    Configure the IdP's SCIM connector to point at the LiteLLM SCIM endpoint with a bearer credential stored in your secret manager, then assign a small pilot group of users and one team to the application. Trigger a sync and confirm that the users and teams appear in LiteLLM with the expected names and memberships. Note that SCIM creating a user does not mint a virtual key, so the users will exist but cannot call the gateway yet. The check is a pilot user and team visible in LiteLLM, matching the IdP group membership, with no keys created as a side effect.

  5. Configure JWT authentication against the IdP

    Set JWT_PUBLIC_KEY_URL to the IdP's JWKS or OIDC discovery URL, and set JWT_AUDIENCE and JWT_ISSUER to the values from your IdP client. Configure the claim mappings for user ID, email and team IDs so that the gateway attributes each request to the right identity and team. Send a request with a token issued to the pilot user and confirm it is accepted and attributed to that user in the logs. Then send a token with the wrong audience or issuer and confirm it is rejected. Both results must hold before you rely on JWT identity for spend or access decisions.

  6. Configure SAML 2.0 for the admin UI

    Configure SAML either in the admin UI or through the SAML_* environment variables, which LiteLLM reads through the python3-saml library. Register the gateway as a service provider in your IdP with the ACS URL and entity ID the gateway expects, and map the admin role from an IdP attribute or group. Test the SP-initiated flow by starting at the admin UI login, and test the IdP-initiated flow by launching LiteLLM from the IdP dashboard. Confirm that a user without the admin group cannot reach admin pages. Both flows must succeed with the right role before you hand admin access to anyone.

  7. Issue virtual keys with model, budget and rate limits

    Identity alone does not grant model access, so issue a virtual key for each pilot team or service account with an explicit list of allowed models, a budget, and TPM and RPM limits. Keep key creation as a separate, recorded action, since SCIM and JWT do not create keys on their own. Test the key against an allowed model and then against a model it is not permitted to use, and confirm the second call is refused. Check that spend for the test calls appears against the correct team and key. The key is ready for wider rollout only when both the allowed and refused calls behave as configured and the spend is attributed correctly.

Which identity attributes map to which LiteLLM objects

This table compares each identity attribute or token claim from your identity provider with the LiteLLM object it populates and the decision to settle before go-live. Read it as a checklist: each row is a point where a mismatch in naming or scope lets the wrong person reach the wrong models or budget. Exact claim names depend on your identity provider and must be confirmed in your own tenant before you configure LiteLLM.

IdP attribute or claimLiteLLM object or fieldDecide before go-live
User identifier (stable subject or user ID)User ID claim mapping for JWT auth; SCIM user recordPick the immutable identifier the IdP sends, and confirm it stays the same across renames and re-provisioning
Email addressUser email claim mapping; user record and spend attributionDecide whether email is the lookup key for reporting and whether aliases or changed addresses are handled
Group or team membershipTeam IDs claim mapping; SCIM-synced teams and team membershipMap each IdP group to exactly one LiteLLM team and agree who owns that mapping
Admin role or app roleAdmin UI access (SSO and SAML role assignment); organization and team RBACLimit UI admin rights to a named group and confirm which role claim the SAML or OIDC response carries
JWT audience (aud)JWT_AUDIENCE settingSet the audience to the value your gateway client registers so tokens meant for other apps are rejected
JWT issuer (iss)JWT_ISSUER setting and JWT_PUBLIC_KEY_URL (JWKS or OIDC discovery)Record the exact issuer string from your IdP, including trailing slashes, and the key rotation process
Virtual key scope: modelsKey model restriction listDecide which model groups each team or key may call, and who approves changes
Virtual key scope: budget, TPM and RPMPer-key, per-user and per-team budgets; TPM and RPM limitsSet limits at the team level first, then per key, and decide who may request a temporary increase

Why virtual keys are still issued after SCIM and JWT auth are on

Turning on SCIM and JWT auth does not give anyone access to a model. LiteLLM's identity provisioning documentation states that SCIM creating a user does not mint a key, and that JWT auth verifying a token does not create a key by itself. SCIM tells LiteLLM who exists and which teams they belong to, and JWT auth tells the gateway who is calling when a token arrives. Neither decides which models a person may use, what budget applies, or how much spend is recorded against them. That decision sits in a separate issuance step, and your team has to design it on purpose. Confirm the issuance workflow in your own environment before go-live, because the answer determines whether an approved user can call a model at all.

Three patterns are common. Per-person virtual keys give each employee a key with their own model list, budget and rate limits, so spend and request logs trace to one individual. Per-team keys attach budget and model access to a team, so the team lead owns spend, but logs show the shared key rather than the caller, which means identity must be carried by JWT claims or metadata if you need person-level traceability. CLI login flows let a developer sign in through the identity provider and receive a short-lived credential, which keeps long-lived keys off laptops but depends on the login path being enabled in your version. Each pattern changes three things: who appears in the audit trail, who owns the budget, and what offboarding requires. Per-person keys make offboarding a key revocation tied to the directory event. Team keys need rotation when membership changes.

Write the decision down before you build the sync. For each group of users, record who requests a key, who approves the model list and budget, who is notified when a user leaves, and whether removing a user from an IdP group should revoke keys, stop their spend or only remove team membership. Test each case with a disabled test account, not a production user. Ask your LiteLLM contact to confirm how the version you run handles key expiry and revocation on SCIM deprovisioning, since these behaviors have changed between releases and should be checked against your pinned version rather than assumed.

How the identity provider choice changes the build

When LiteLLM connects directly to a Microsoft Entra ID tenant, the gateway trusts the tenant's signing keys, the admin UI relies on the tenant's SAML application, and provisioning comes from the tenant's directory. There is no broker to deploy, so the build is the shortest of the options, but the tenant must supply each piece the gateway uses.

  • SCIM endpoint: Confirm that your tenant and license can push users and groups to a SCIM endpoint LiteLLM accepts, and decide how directory groups map to LiteLLM teams before you test.
  • JWKS or discovery URL: Use the tenant's OIDC discovery document for JWT_PUBLIC_KEY_URL, and confirm the JWT_AUDIENCE and JWT_ISSUER values that tokens from your applications actually carry.
  • SAML metadata: Export the metadata for the application that protects the admin UI, and confirm which SP-initiated and IdP-initiated flows your tenant allows.
  • Where the work sits: Most settings live in the tenant's admin portal and in the LiteLLM configuration and secret store, with no intermediate service for your team to operate.

Confirm with Microsoft which provisioning and token features apply to your tenant and license before you finalize the group-to-team mapping.

Security settings that harden the identity integration

The identity integration is only as strong as the settings around it. The six controls below cover the gateway's master key, token validation, admin access, virtual key scopes, and how the Keycloak platform is updated and replicated. Each one closes a gap that SCIM, JWT auth and SAML SSO would otherwise leave open.

Keep the master key in a secret manager

Set LITELLM_MASTER_KEY through your secret manager and inject it at runtime, never in a values file, Helm chart or config committed to source control. The key must start with sk-, so check that your secret policy and rotation process accept that prefix. Confirm who can read the secret in each environment and record when it was last rotated.

LiteLLM production guide

Validate JWT issuer and audience

Set JWT_AUDIENCE and JWT_ISSUER so the gateway accepts only tokens minted for LiteLLM by your identity provider. Without them, a valid token issued to another application in the same IdP may be accepted. Test with a token from a different client and confirm it is rejected, and confirm that the claim mappings for user ID, email and team IDs match what your IdP actually emits.

Restrict admin access to named administrators

Limit the LiteLLM admin UI to named administrators through SAML 2.0 or SSO group mapping, and keep the number of people who hold the master key as small as possible. Review who can create teams, issue keys and change budgets, because those actions shape access for every user. Remove admin rights when people change roles, since SCIM deprovisioning alone does not revoke them.

Scope virtual keys to least privilege

Issue virtual keys with only the models, budgets and rate limits each workload needs, and bind them to a team rather than a person where a service uses them. SCIM creates users and teams but does not mint keys, so every key is a separate decision. Set per-key budgets and TPM and RPM limits, and review keys that have not been used recently.

Keep the Keycloak operator in manual approval

The Keycloak Operator documentation strongly recommends manual approval mode for operator updates. Keep that setting so a new operator release does not roll Keycloak to a newer version during business hours. Schedule each upgrade in a test realm first, confirm that SAML and OIDC clients still sign in, and then approve the change in production.

Keycloak Operator docs

Replicate the Keycloak database synchronously

If Keycloak runs in a high availability design, both supported architectures require a synchronously replicated database. Asynchronous replication can lose the sessions and user state that the cluster depends on during failover. Confirm the replication mode with your database team, test a failover while users are signed in, and check that the supported PostgreSQL version is in the range Keycloak lists. For network and container image controls, see the LiteLLM security hardening topic.

Keycloak high availability

How to test each identity path before users depend on it

Test each identity path separately before any team depends on it, because a working login does not prove that provisioning, token checks and spend controls behave as intended. Start with SCIM: create a test user and a test team in the identity provider, confirm they appear in LiteLLM, then change an attribute such as team membership and confirm the change lands. Finally, deprovision the test user and confirm that the user is blocked and that their existing keys are handled the way your policy requires. Note what LiteLLM shows after each step, because SCIM creating a user does not mint a key, so the test must also confirm that no key was issued by accident and that the key you intended to issue was issued.

For JWT authentication, use tokens from your Keycloak realm or other IdP and check three cases: a valid token is accepted, a token with the wrong JWT_AUDIENCE or JWT_ISSUER is rejected, and an expired token is refused. Confirm that the claim mappings for user ID, email and team IDs produce the identity you expect in the request logs. For SAML 2.0 on the admin UI, test both SP-initiated and IdP-initiated login over HTTP-POST, then sign in as a user who is outside the admin group and confirm that access is denied. Record the exact error for each case so you can tell a configuration fault from a policy decision later.

Test virtual keys last, because they are the layer that enforces model access and spend. Issue a key restricted to one model, confirm it succeeds on that model, and confirm it fails when it calls any other model. Set a small budget on a test key and confirm that spend stops at the cap. Keep all of these checks as scripts with fixed inputs and expected results, and rerun them after every LiteLLM or Keycloak upgrade, since release changes can alter behavior. Confirm the exact test steps and expected outputs with your own environment and the vendor documentation before you treat the results as acceptance criteria.

Why identity sync and login fail, and how to fix each cause

This table maps common symptoms in LiteLLM SCIM, JWT and SAML setups to their likely causes and fixes. Read each row against the symptom you see, check the cause first, and apply the fix before changing identity provider settings. The main takeaway is that most failures sit in the gap between the IdP and the gateway, so compare URLs, claims and keys on both sides.

SymptomLikely causeFix
Users sync through SCIM but cannot call modelsSCIM creates the user but does not mint a virtual key, so no key exists for the callerIssue a virtual key for each synced user or team, scoped to the models and budget that user needs, and confirm the caller sends that key
JWT requests rejected as invalid or unverifiedJWT_PUBLIC_KEY_URL is unreachable from the gateway pods, often because of egress rules, a private IdP hostname or a proxyTest the JWKS or OIDC discovery URL from inside the gateway network, then allow that route or host it on a reachable internal address
JWT rejected even though the token looks validIssuer string differs from the token's iss claim, commonly by a trailing slashCopy the exact iss value from a decoded token into JWT_ISSUER, including or excluding the trailing slash to match the IdP
JWT rejected with an audience errorToken aud claim does not match JWT_AUDIENCE, for example the IdP issued the token for a different clientRequest a token for the client the gateway expects, or set JWT_AUDIENCE to the value the IdP actually places in aud
Admin SAML login fails at the callbackACS URL registered in the IdP does not match the gateway's configured URL, or the signing certificate is outdatedMake the ACS URL identical in the IdP and SAML_* settings including scheme and path, then re-upload the current signing certificate
A team does not appear after SCIM syncThe IdP does not send the group claim or group membership attribute that LiteLLM maps to team IDsAdd the group attribute to the SCIM and token mappings, confirm the group is assigned to the application, then trigger a fresh sync
Keycloak upgrade blocked by a schema changeDatabase migration ran at startup or the operator updated automatically without reviewBack up the database, read the upgrading guide for that release, switch the operator to manual approval and consider applying migration SQL manually

What buyers ask before wiring SCIM, JWT and SAML to LiteLLM

Do SCIM and JWT auth require an Enterprise license in LiteLLM?

Yes. SCIM provisioning and JWT authentication are both Enterprise features in LiteLLM, according to its identity provisioning guidance. The admin UI supports SSO with Google, Microsoft Entra ID, Okta and generic OIDC providers, and from v1.76.0 that SSO is free for up to 5 users, with an Enterprise license needed beyond that. SAML 2.0 for the admin UI is documented separately, so confirm the license terms for your edition and user count with LiteLLM before you design around them. Check the LiteLLM Enterprise documentation for the current feature list, because a pilot with a few admins can look free while a company-wide rollout is not.

How long does LiteLLM identity integration take to build?

No fixed duration applies to every environment, so treat any number you see as a starting point to verify. Duration depends on how many identity provider tenants or realms you connect, how complex the claim mappings are for user ID, email and team IDs, how your key issuance policy is defined, and how much testing you require before production. Each of these adds work in a predictable way: every extra tenant repeats the SCIM and JWT configuration, and every extra team mapping needs its own test cases. Ask any provider to break the schedule into those workstreams and state which ones are in scope.

What cost components should we expect for this integration?

Expect four components. The first is the LiteLLM license, which is needed for SCIM and JWT auth. The second is build time, paid to your own engineers or to an implementation partner such as DeployOpen, which is quoted from a written scope. The third is identity provider licensing, since SCIM and SAML features often depend on your IdP plan. The fourth is infrastructure for the gateway, its PostgreSQL database and Redis when more than one proxy instance runs. Build time is one-time, while licenses, IdP fees and infrastructure recur. When you ask for a quote, request each component on its own line and state which IdP, environments and test scope it covers.

What must our team provide before the work starts?

The work moves fastest when your team supplies four things up front. Administrative access to the identity provider, with rights to create SCIM and SAML applications and configure claims. A written group design that maps IdP groups to LiteLLM teams and roles. Certificates for SAML signing and the TLS endpoints the gateway uses. A test tenant or realm where provisioning, JWT and SSO flows can be exercised before production users are affected. Also agree who approves the key issuance policy, because LiteLLM requires that SCIM creating a user does not mint a key and that JWT verification does not create one by itself.

Can our own engineers build this without a partner?

Yes, if your team has experience with identity protocols and Kubernetes or your chosen deployment target. The steps are well defined: enable SCIM and JWT auth on an Enterprise license, set JWT_PUBLIC_KEY_URL to the IdP's JWKS or OIDC discovery URL, define optional JWT_AUDIENCE and JWT_ISSUER values, map claims, configure SAML_* settings or the admin UI, and issue virtual keys for the models each team may use. The harder parts are testing edge cases, such as deprovisioning, token expiry and group changes, and keeping the setup consistent across environments. Make a realistic inventory of those skills before deciding, and consider a short review by an outside engineer to check the design.

Which identity provider should we choose for SCIM, JWT and SAML?

The choice depends on the IdP you already run, because LiteLLM must trust its tokens and sync from its directory. LiteLLM documents support for Google, Microsoft Entra ID, Okta and generic OIDC providers for admin SSO. If you want a self-managed option, Keycloak is an open source identity server under Apache 2.0 that supports OpenID Connect, OAuth 2.0 and SAML 2.0. Confirm for your chosen IdP that it exposes a JWKS or OIDC discovery URL, supports SCIM provisioning to the application you configure, and emits the group and team claims you need. Check the vendor's documentation rather than assuming these features are available.

How is LiteLLM Enterprise support structured?

According to LiteLLM's enterprise documentation, Enterprise support includes a dedicated channel with its engineering team. Optional 24/7 SLAs are also available, with a 1 hour response for critical issues and 72 hours for security patches. Confirm the exact terms, coverage hours and which severity levels they apply to in your written agreement with LiteLLM, since those terms can change. Your own integration partner handles the build and any changes to your configuration, so separate the vendor support questions from the implementation scope when you compare offers.

How DeployOpen works on this

DeployOpen plans, implements, integrates, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For LiteLLM, we wire SCIM, JWT auth and SAML SSO together with the virtual keys that still have to be issued, so each piece is tested as part of one identity flow your security and compliance teams can review.

How we scope

  • Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • The written scope names which identity provider, SCIM, JWT and SAML flows, and which Enterprise features, are in and out of the work.
  • We confirm your LiteLLM edition and license position, since SCIM and JWT auth are Enterprise features, before any build begins.

How we build

  • We configure SCIM user and team sync, JWT claim mappings and SAML settings against your identity provider in a non-production environment first.
  • We test that a SCIM-created user still needs a virtual key issued, and that a verified JWT produces the access you intended.
  • We run negative tests with expired tokens, wrong audiences and users removed from groups, and record the results for review.

How we hand over

  • You receive configuration documentation covering JWT_PUBLIC_KEY_URL, audience, issuer, claim mappings and SAML_* settings as deployed.
  • The handover includes a runbook for key issuance, offboarding, certificate rotation and what to check when a sign-in fails.
  • We walk your identity, platform and security teams through the flow so they can review and operate it without us.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering changes to your identity provider or LiteLLM releases.
  • Retainer scope is agreed in writing, including how identity changes and LiteLLM version upgrades are reviewed and retested.
  • We can retest the identity flow after upgrades, IdP changes or certificate renewals as part of the agreed support scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.