{"record":{"id":"af99e584f0e1d30f","repo":"BerriAI/litellm","slug":"relocating-a-team-to-a-different-organization-requ","errorCode":null,"errorMessage":"Relocating a team to a different organization requires PROXY_ADMIN or org-admin of the destination org.","messagePattern":"Relocating a team to a different organization requires PROXY_ADMIN or org-admin of the destination org\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/management_endpoints/team_endpoints.py","lineNumber":2058,"sourceCode":"            current_org_id: Final = getattr(existing_team_row, \"organization_id\", None)\n            if (\n                data.organization_id != current_org_id\n                and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value\n            ):\n                # Is the caller org_admin of the destination org?\n                caller_memberships: Final = (\n                    await _org_membership_db(prisma_client).find_many(\n                        where={\n                            \"user_id\": user_api_key_dict.user_id,\n                            \"organization_id\": data.organization_id,\n                            \"user_role\": LitellmUserRoles.ORG_ADMIN.value,\n                        }\n                    )\n                    if user_api_key_dict.user_id\n                    else []\n                )\n                if not caller_memberships:\n                    raise HTTPException(\n                        status_code=403,\n                        detail={\n                            \"error\": (\n                                \"Relocating a team to a different organization \"\n                                \"requires PROXY_ADMIN or org-admin of the \"\n                                \"destination org.\"\n                            )\n                        },\n                    )\n\n            await fetch_and_validate_organization(\n                organization_id=data.organization_id,\n                existing_team_row=existing_team_row,\n                llm_router=llm_router,\n                prisma_client=prisma_client,\n                user_api_key_dict=user_api_key_dict,\n            )\n        elif data.organization_id is not None and len(data.organization_id) == 0:","sourceCodeStart":2040,"sourceCodeEnd":2076,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/team_endpoints.py#L2040-L2076","documentation":"Error \"Relocating a team to a different organization requires PROXY_ADMIN or org-admin of the destination org.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/team_endpoints.py:2058 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry with a PROXY_ADMIN key, or with a key that is org-admin of the destination organization."],"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"}