{"record":{"id":"1113111dfef94a2b","repo":"BerriAI/litellm","slug":"you-are-not-authorized-to-check-this-team-s-keys","errorCode":null,"errorMessage":"You are not authorized to check this team's keys","messagePattern":"You are not authorized to check this team's keys","errorType":"http","errorClass":"ProxyException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/key_management_endpoints.py","lineNumber":5292,"sourceCode":"            param=\"user_id\",\n            code=status.HTTP_403_FORBIDDEN,\n        )\n\n    complete_user_info: Final = LiteLLM_UserTable.model_validate(complete_user_info_db_obj.model_dump())\n\n    # internal user can only see their own keys\n    if user_id:\n        if complete_user_info.user_id != user_id:\n            raise ProxyException(\n                message=\"You are not authorized to check another user's keys\",\n                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:","sourceCodeStart":5274,"sourceCodeEnd":5310,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/key_management_endpoints.py#L5274-L5310","documentation":"Error \"You are not authorized to check this team's keys\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/key_management_endpoints.py:5292 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Query only teams you administer, or authenticate with a proxy admin key.","Ask a team admin or proxy admin to check the team'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-14T00:17:10.932Z"}