BerriAI/litellm · error · HTTPException

Team members cannot assign access groups to keys for team {t

Error message

Team members cannot assign access groups to keys for team {team_table.team_id}. Ask a team or proxy admin to enable the '/key/access_group_assignment' team member permission to allow this.

What it means

Error "Team members cannot assign access groups to keys for team {team_table.team_id}. Ask a team or proxy admin to enable the '/key/access_group_assignment' team member permission to allow this." thrown in BerriAI/litellm.

Source

Thrown at litellm/proxy/management_helpers/team_member_permission_checks.py:198

        team_member_object: Final = _get_user_in_team(team_table=team_table, user_id=user_api_key_dict.user_id)

        # Team admins always bypass (consistent with other member-permission checks).
        if team_member_object is not None and team_member_object.role == "admin":
            return

        permissions: Final = (
            TeamMemberPermissionChecks._get_list_of_route_enum_as_str(
                TeamMemberPermissionChecks.get_permissions_for_team_member(
                    team_member_object=team_member_object,
                    team_table=team_table,
                )
            )
            if team_member_object is not None
            else []
        )

        if KeyManagementRoutes.KEY_ACCESS_GROUP_ASSIGNMENT.value not in permissions:
            raise HTTPException(
                status_code=403,
                detail=(
                    "Team members cannot assign access groups to keys for team "
                    f"{team_table.team_id}. Ask a team or proxy admin to enable the "
                    f"'{KeyManagementRoutes.KEY_ACCESS_GROUP_ASSIGNMENT.value}' team "
                    "member permission to allow this."
                ),
            )

    @staticmethod
    async def user_belongs_to_keys_team(
        user_api_key_dict: UserAPIKeyAuth,
        existing_key_row: LiteLLM_VerificationToken,
    ) -> bool:
        """
        Returns True if the user belongs to the team that the key is assigned to
        """
        from litellm.proxy.management_endpoints.key_management_endpoints import (

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Ask a team or proxy admin to enable the '/key/access_group_assignment' team member permission, or have an admin assign the access groups.

When it happens

Trigger: Thrown at litellm/proxy/management_helpers/team_member_permission_checks.py:198 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/a338422ad312fe5a. Report an issue: GitHub.