{"record":{"id":"47059c2390a88951","repo":"BerriAI/litellm","slug":"you-are-not-authorized-to-check-this-organization","errorCode":null,"errorMessage":"You are not authorized to check this organization's keys","messagePattern":"You are not authorized to check this organization's keys","errorType":"http","errorClass":"ProxyException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":5303,"sourceCode":"                type=ProxyErrorTypes.bad_request_error,\n                param=\"user_id\",\n                code=status.HTTP_403_FORBIDDEN,\n            )\n\n    if team_id:\n        if team_id not in complete_user_info.teams:\n            raise ProxyException(\n                message=\"You are not authorized to check this team's keys\",\n                type=ProxyErrorTypes.bad_request_error,\n                param=\"team_id\",\n                code=status.HTTP_403_FORBIDDEN,\n            )\n\n    if organization_id:\n        if complete_user_info.organization_memberships is None or organization_id not in [\n            membership.organization_id for membership in complete_user_info.organization_memberships\n        ]:\n            raise ProxyException(\n                message=\"You are not authorized to check this organization's keys\",\n                type=ProxyErrorTypes.bad_request_error,\n                param=\"organization_id\",\n                code=status.HTTP_403_FORBIDDEN,\n            )\n\n    if key_hash:\n        try:\n            key_info: Final[LiteLLM_VerificationToken] = await VerificationTokenRepository(\n                prisma_client\n            ).table.find_unique(\n                where={\"token\": key_hash},\n            )\n        except Exception:\n            raise ProxyException(\n                message=\"Key Hash not found.\",\n                type=ProxyErrorTypes.bad_request_error,\n                param=\"key_hash\",","sourceCodeStart":5285,"sourceCodeEnd":5321,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L5285-L5321","documentation":"Error \"You are not authorized to check this organization's keys\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5303 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Query only organizations you administer, or authenticate with a proxy admin key.","Ask an org admin or proxy admin to check the organization's keys."],"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"}