{"record":{"id":"88b50f94508240a5","repo":"BerriAI/litellm","slug":"you-do-not-have-access-to-this-organization","errorCode":null,"errorMessage":"You do not have access to this organization","messagePattern":"You do not have access to this organization","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/organization_endpoints.py","lineNumber":231,"sourceCode":"    prisma_table: Final[object] = repository.table\n    return prisma_table\n\n\nasync def _verify_org_access(\n    organization_id: str,\n    user_api_key_dict: UserAPIKeyAuth,\n    prisma_client: PrismaClient,\n) -> None:\n    \"\"\"\n    Verify the caller is either a proxy admin or an org admin of the given organization.\n\n    Raises HTTPException(403) if the caller does not have access.\n    \"\"\"\n    if _user_has_admin_view(user_api_key_dict):\n        return\n\n    if not user_api_key_dict.user_id:\n        raise HTTPException(\n            status_code=status.HTTP_403_FORBIDDEN,\n            detail=\"You do not have access to this organization\",\n        )\n\n    from litellm.proxy.proxy_server import proxy_logging_obj, user_api_key_cache\n\n    caller_user: Final = await get_user_object(\n        user_id=user_api_key_dict.user_id,\n        prisma_client=prisma_client,\n        user_api_key_cache=user_api_key_cache,\n        user_id_upsert=False,\n        proxy_logging_obj=proxy_logging_obj,\n    )\n    if caller_user is None:\n        raise HTTPException(\n            status_code=status.HTTP_403_FORBIDDEN,\n            detail=\"You do not have access to this organization\",\n        )","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/organization_endpoints.py#L213-L249","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/organization_endpoints.py:231 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an API key that is a member/admin of this organization, or a PROXY_ADMIN key."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}