BerriAI/litellm · error · HTTPException

Failed to retrieve user information from SSO

Error message

Failed to retrieve user information from SSO

What it means

Error "Failed to retrieve user information from SSO" thrown in BerriAI/litellm.

Source

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

    proxy_logging_obj: ProxyLogging,
    prefill_user_code: str | None = None,
    sso_assertion: SSOIdentityAssertion | None = None,
):
    from fastapi.responses import HTMLResponse

    user_id: Final = parsed_openid_result.get("user_id")
    user_email: Final = parsed_openid_result.get("user_email")
    user_info: Final = await get_user_info_from_db(
        result=result,
        prisma_client=prisma_client,
        user_api_key_cache=user_api_key_cache,
        proxy_logging_obj=proxy_logging_obj,
        user_email=user_email,
        user_defined_values=user_defined_values,
        alternate_user_id=user_id,
    )
    if user_info is None:
        raise HTTPException(status_code=500, detail="Failed to retrieve user information from SSO")
    if not user_info.user_id:
        raise HTTPException(status_code=500, detail="Failed to retrieve user information from SSO")

    await retain_sso_identity_assertion_for_ema(user_id=user_info.user_id, assertion=sso_assertion)

    teams: list[str] = []
    if hasattr(user_info, "teams") and user_info.teams:
        teams = user_info.teams if isinstance(user_info.teams, list) else []

    team_details: Final = await _fetch_cli_sso_team_details(prisma_client=prisma_client, teams=teams)
    if team_details is None:
        raise HTTPException(
            status_code=500,
            detail="Could not resolve team model grants for this login. Please try again",
        )
    resolved_teams: Final = _cli_sso_session_teams(team_details)
    attribution_metadata: Final = build_cli_sso_attribution_metadata(result=result)
    if attribution_metadata:

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the SSO provider userinfo endpoint configuration and proxy logs, then retry the login.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:2275 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/0719a5cadb538d0c. Report an issue: GitHub.