{"record":{"id":"aa5371573e6fd2dc","repo":"BerriAI/litellm","slug":"you-do-not-have-org-admin-access-to-the-requested","errorCode":null,"errorMessage":"You do not have org_admin access to the requested organization(s).","messagePattern":"You do not have org_admin access to the requested organization\\(s\\)\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/internal_user_endpoints.py","lineNumber":2001,"sourceCode":"        )\n\n    allowed_org_ids = [\n        m.organization_id\n        for m in (caller_user.organization_memberships or [])\n        if m.user_role == LitellmUserRoles.ORG_ADMIN.value\n    ]\n    if not allowed_org_ids:\n        raise HTTPException(\n            status_code=403,\n            detail={\"error\": \"Only proxy admins and organization admins can list users.\"},\n        )\n\n    # If client also sent organization_ids, intersect with allowed orgs\n    if organization_ids:\n        requested: Final = set(oid.strip() for oid in organization_ids.split(\",\") if oid.strip())\n        intersection: Final = list(requested & set(allowed_org_ids))\n        if not intersection:\n            raise HTTPException(\n                status_code=403,\n                detail={\"error\": \"You do not have org_admin access to the requested organization(s).\"},\n            )\n        allowed_org_ids = intersection\n\n    return \",\".join(allowed_org_ids)\n\n\n@router.get(\n    \"/user/list\",\n    tags=[\"Internal User management\"],\n    dependencies=[Depends(user_api_key_auth)],\n    response_model=UserListResponse,\n)\nasync def get_users(\n    role: str | None = fastapi.Query(default=None, description=\"Filter users by role\"),\n    user_ids: str | None = fastapi.Query(default=None, description=\"Get list of users by user_ids\"),\n    sso_user_ids: str | None = fastapi.Query(default=None, description=\"Get list of users by sso_user_id\"),","sourceCodeStart":1983,"sourceCodeEnd":2019,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/internal_user_endpoints.py#L1983-L2019","documentation":"Error \"You do not have org_admin access to the requested organization(s).\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/internal_user_endpoints.py:2001 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request org_admin access to the organization(s) from your proxy admin.","Query only organizations for which your key has org_admin rights."],"exampleFix":null,"handlingStrategy":null,"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"}