BerriAI/litellm · error · ProxyException

You are not authorized to check this team's keys

Error message

You are not authorized to check this team's keys

What it means

Error "You are not authorized to check this team's keys" thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5292

            param="user_id",
            code=status.HTTP_403_FORBIDDEN,
        )

    complete_user_info: Final = LiteLLM_UserTable.model_validate(complete_user_info_db_obj.model_dump())

    # internal user can only see their own keys
    if user_id:
        if complete_user_info.user_id != user_id:
            raise ProxyException(
                message="You are not authorized to check another user's keys",
                type=ProxyErrorTypes.bad_request_error,
                param="user_id",
                code=status.HTTP_403_FORBIDDEN,
            )

    if team_id:
        if team_id not in complete_user_info.teams:
            raise ProxyException(
                message="You are not authorized to check this team's keys",
                type=ProxyErrorTypes.bad_request_error,
                param="team_id",
                code=status.HTTP_403_FORBIDDEN,
            )

    if organization_id:
        if complete_user_info.organization_memberships is None or organization_id not in [
            membership.organization_id for membership in complete_user_info.organization_memberships
        ]:
            raise ProxyException(
                message="You are not authorized to check this organization's keys",
                type=ProxyErrorTypes.bad_request_error,
                param="organization_id",
                code=status.HTTP_403_FORBIDDEN,
            )

    if key_hash:

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Query only teams you administer, or authenticate with a proxy admin key.
  2. Ask a team admin or proxy admin to check the team's keys.

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5292 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/1113111dfef94a2b. Report an issue: GitHub.