{"record":{"id":"718a7ff47326bb7b","repo":"BerriAI/litellm","slug":"missing-samlresponse-in-callback-request","errorCode":null,"errorMessage":"Missing SAMLResponse in callback request.","messagePattern":"Missing SAMLResponse in callback request\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/ui_sso.py","lineNumber":2145,"sourceCode":"    )\n\n    _disable_ui_flag: Final = os.getenv(\"DISABLE_ADMIN_UI\")\n    if _disable_ui_flag is not None and str_to_bool(value=_disable_ui_flag):\n        return admin_ui_disabled()\n\n    if prisma_client is None:\n        raise HTTPException(status_code=500, detail=CommonProxyErrors.db_not_connected_error.value)\n    if master_key is None:\n        raise ProxyException(\n            message=\"Master Key not set for Proxy. Set `LITELLM_MASTER_KEY` in .env or general_settings:master_key in config.yaml.\",\n            type=ProxyErrorTypes.auth_error,\n            param=\"master_key\",\n            code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n        )\n\n    post_data: Final = await SAMLAuthHandler.read_acs_post_data(request)\n    if \"SAMLResponse\" not in post_data:\n        raise HTTPException(status_code=400, detail=\"Missing SAMLResponse in callback request.\")\n\n    result: Final = await SAMLAuthHandler.handle_acs(request=request, cache=user_api_key_cache, post_data=post_data)\n\n    await _raise_if_sso_exceeds_free_user_limit(premium_user, prisma_client)\n\n    ui_access_mode: Final = general_settings.get(\"ui_access_mode\", None)\n    relay_state: Final = post_data.get(\"RelayState\")\n    cp_return_to: Final[str | None] = (\n        relay_state\n        if isinstance(relay_state, str) and SSOAuthenticationHandler._validate_return_to(relay_state)\n        else None\n    )\n\n    return await SSOAuthenticationHandler.get_redirect_response_from_openid(\n        result=result,\n        request=request,\n        received_response=None,\n        generic_client_id=None,","sourceCodeStart":2127,"sourceCodeEnd":2163,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/ui_sso.py#L2127-L2163","documentation":"Error \"Missing SAMLResponse in callback request.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/ui_sso.py:2145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the SAML IdP posts a SAMLResponse to the callback; check the SAML app configuration and restart the login."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}