BerriAI/litellm · error · HTTPException

Missing SAMLResponse in callback request.

Error message

Missing SAMLResponse in callback request.

What it means

Error "Missing SAMLResponse in callback request." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/ui_sso.py:2145

    )

    _disable_ui_flag: Final = os.getenv("DISABLE_ADMIN_UI")
    if _disable_ui_flag is not None and str_to_bool(value=_disable_ui_flag):
        return admin_ui_disabled()

    if prisma_client is None:
        raise HTTPException(status_code=500, detail=CommonProxyErrors.db_not_connected_error.value)
    if master_key is None:
        raise ProxyException(
            message="Master Key not set for Proxy. Set `LITELLM_MASTER_KEY` in .env or general_settings:master_key in config.yaml.",
            type=ProxyErrorTypes.auth_error,
            param="master_key",
            code=status.HTTP_500_INTERNAL_SERVER_ERROR,
        )

    post_data: Final = await SAMLAuthHandler.read_acs_post_data(request)
    if "SAMLResponse" not in post_data:
        raise HTTPException(status_code=400, detail="Missing SAMLResponse in callback request.")

    result: Final = await SAMLAuthHandler.handle_acs(request=request, cache=user_api_key_cache, post_data=post_data)

    await _raise_if_sso_exceeds_free_user_limit(premium_user, prisma_client)

    ui_access_mode: Final = general_settings.get("ui_access_mode", None)
    relay_state: Final = post_data.get("RelayState")
    cp_return_to: Final[str | None] = (
        relay_state
        if isinstance(relay_state, str) and SSOAuthenticationHandler._validate_return_to(relay_state)
        else None
    )

    return await SSOAuthenticationHandler.get_redirect_response_from_openid(
        result=result,
        request=request,
        received_response=None,
        generic_client_id=None,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Ensure the SAML IdP posts a SAMLResponse to the callback; check the SAML app configuration and restart the login.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:2145 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/718a7ff47326bb7b. Report an issue: GitHub.