{"record":{"id":"9cb0f5b1e96ca612","repo":"BerriAI/litellm","slug":"you-do-not-have-access-to-this-team","errorCode":null,"errorMessage":"You do not have access to this team","messagePattern":"You do not have access to this team","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":438,"sourceCode":"    Verify the caller is authorized to manage the given team.\n\n    Access is granted if:\n    - Caller is a proxy admin, OR\n    - Caller is an org admin for the team's organization, OR\n    - Caller is a team admin of this team\n\n    Raises HTTPException(403) otherwise.\n    \"\"\"\n    if user_api_key_dict.user_role == LitellmUserRoles.PROXY_ADMIN:\n        return\n\n    if _is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj):\n        return\n\n    if await _is_user_org_admin_for_team(user_api_key_dict=user_api_key_dict, team_obj=team_obj):\n        return\n\n    raise HTTPException(\n        status_code=status.HTTP_403_FORBIDDEN,\n        detail=\"You do not have access to this team\",\n    )\n\n\nclass TeamMemberBudgetHandler:\n    \"\"\"Helper class to handle team member budget, RPM, and TPM limit operations\"\"\"\n\n    # Metadata keys that are owned and set by the server. Callers must not be\n    # able to inject or overwrite these via request payloads.\n    SYSTEM_MANAGED_METADATA_KEYS = (\"team_member_budget_id\",)\n\n    @staticmethod\n    def strip_system_managed_metadata_keys(metadata: dict | None) -> None:\n        \"\"\"Remove server-owned metadata keys from a caller-supplied dict.\"\"\"\n        if not isinstance(metadata, dict):\n            return\n        for key in TeamMemberBudgetHandler.SYSTEM_MANAGED_METADATA_KEYS:","sourceCodeStart":420,"sourceCodeEnd":456,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L420-L456","documentation":"_verify_team_access authorization guard: the caller is neither a proxy admin, nor an org admin for the team's organization, nor a team admin of this team, so the management request is denied with 403. At-fault condition is insufficient role for the target team.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:438 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an API key that is a member/admin of this team, 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-14T00:17:10.932Z"}