BerriAI/litellm · error · HTTPException
You can only view teams within your organizations.
Error message
You can only view teams within your organizations.
What it means
Error "You can only view teams within your organizations." thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/team_endpoints.py:4744
org_admin_org_ids: list[str] | None = None
if is_proxy_admin:
return user_id, org_admin_org_ids
# Always check org admin status so that even own-queries see
# the full set of organisation teams, not just direct memberships.
if user_api_key_dict.user_id:
org_admin_org_ids = await _get_org_admin_org_ids(
user_id=user_api_key_dict.user_id,
prisma_client=prisma_client,
user_api_key_cache=user_api_key_cache,
proxy_logging_obj=proxy_logging_obj,
)
if org_admin_org_ids is not None:
# Org admin: validate org_id filter if provided
if organization_id and organization_id not in org_admin_org_ids:
raise HTTPException(
status_code=403,
detail={"error": "You can only view teams within your organizations."},
)
# When the caller is an org admin querying their own teams (or no
# specific user), null out user_id so that
# _build_team_list_where_conditions scopes only by organization_id
# — org admins should see all teams in their orgs, not just teams
# they are a direct member of. Keep user_id when the org admin
# explicitly queries a *different* user's teams.
if user_id is None or user_id == user_api_key_dict.user_id:
user_id = None
verbose_proxy_logger.debug(
"list_team_v2: org admin access for user=%s, org_ids=%s, user_id_filter=%s",
user_api_key_dict.user_id,
org_admin_org_ids,
user_id,
)
else:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Query only teams within your own organizations, or use a proxy admin key.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/team_endpoints.py:4744 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/3393483c925d3905.
Report an issue: GitHub.