BerriAI/litellm · error · HTTPException

You do not have access to this team

Error message

You do not have access to this team

What it means

_verify_team_access authorization guard: the caller is neither a proxy admin, nor an org admin for the team's organization, nor a team admin of this team, so the management request is denied with 403. At-fault condition is insufficient role for the target team.

Source

Thrown at litellm/proxy/management_endpoints/team_endpoints.py:438

    Verify the caller is authorized to manage the given team.

    Access is granted if:
    - Caller is a proxy admin, OR
    - Caller is an org admin for the team's organization, OR
    - Caller is a team admin of this team

    Raises HTTPException(403) otherwise.
    """
    if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:
        return

    if _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj):
        return

    if await _is_user_org_admin_for_team(user_api_key_dict=user_api_key_dict, team_obj=team_obj):
        return

    raise HTTPException(
        status_code=status.HTTP_403_FORBIDDEN,
        detail="You do not have access to this team",
    )


class TeamMemberBudgetHandler:
    """Helper class to handle team member budget, RPM, and TPM limit operations"""

    # Metadata keys that are owned and set by the server. Callers must not be
    # able to inject or overwrite these via request payloads.
    SYSTEM_MANAGED_METADATA_KEYS = ("team_member_budget_id",)

    @staticmethod
    def strip_system_managed_metadata_keys(metadata: dict | None) -> None:
        """Remove server-owned metadata keys from a caller-supplied dict."""
        if not isinstance(metadata, dict):
            return
        for key in TeamMemberBudgetHandler.SYSTEM_MANAGED_METADATA_KEYS:

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use an API key that is a member/admin of this team, or a PROXY_ADMIN key.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:438 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/9cb0f5b1e96ca612. Report an issue: GitHub.