BerriAI/litellm · error · HTTPException

You do not have access to this organization

Error message

You do not have access to this organization

What it means

Authorization guard in _verify_org_access: the caller is not a proxy admin (or admin-view role) and their user_id is either missing or does not hold an org_admin membership in the target organization, so organization-scoped operations are denied with 403.

Source

Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:231

    prisma_table: Final[object] = repository.table
    return prisma_table


async def _verify_org_access(
    organization_id: str,
    user_api_key_dict: UserAPIKeyAuth,
    prisma_client: PrismaClient,
) -> None:
    """
    Verify the caller is either a proxy admin or an org admin of the given organization.

    Raises HTTPException(403) if the caller does not have access.
    """
    if _user_has_admin_view(user_api_key_dict):
        return

    if not user_api_key_dict.user_id:
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="You do not have access to this organization",
        )

    from litellm.proxy.proxy_server import proxy_logging_obj, user_api_key_cache

    caller_user: Final = await get_user_object(
        user_id=user_api_key_dict.user_id,
        prisma_client=prisma_client,
        user_api_key_cache=user_api_key_cache,
        user_id_upsert=False,
        proxy_logging_obj=proxy_logging_obj,
    )
    if caller_user is None:
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="You do not have access to this organization",
        )

View on GitHub (pinned to 77b7c6c40c)

Solutions

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

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:231 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/88b50f94508240a5. Report an issue: GitHub.