BerriAI/litellm · error · HTTPException
Group not found with ID: {team_id}
Error message
Group not found with ID: {team_id} What it means
_check_team_exists looks up the team (SCIM group) by team_id and receives None: the group id in the SCIM request has no matching LiteLLM_TeamTable row. Raised as 404 for RFC-compliant not-found behavior.
Source
Thrown at litellm/proxy/management_endpoints/scim/scim_v2.py:281
"""Check if user exists and return user, raise 404 if not found."""
prisma_client: Final = await _get_prisma_client_or_raise_exception()
user: Final = await _table(UserRepository(prisma_client)).find_unique(where={"user_id": user_id})
if not user:
raise HTTPException(status_code=404, detail={"error": f"User not found with ID: {user_id}"})
return user
async def _check_team_exists(team_id: str) -> LiteLLM_TeamTable:
"""Check if team exists and return team, raise 404 if not found."""
prisma_client: Final = await _get_prisma_client_or_raise_exception()
team: Final = await _table(TeamRepository(prisma_client)).find_unique(where={"team_id": team_id})
if not team:
raise HTTPException(status_code=404, detail={"error": f"Group not found with ID: {team_id}"})
return team
def _extract_scim_user_data(user: SCIMUser) -> ScimUserData:
"""Extract common data from SCIMUser object."""
user_email = None
if user.emails and len(user.emails) > 0:
user_email = user.emails[0].value
user_alias = None
if user.name and user.name.givenName:
user_alias = user.name.givenName
teams = []
if user.groups:
teams = [group.value for group in user.groups]
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the group ID. List groups via GET /Groups to find valid IDs.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/scim/scim_v2.py:281 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/d6f9cc0a1decaf57.
Report an issue: GitHub.