{"record":{"id":"968eafe9ae59d59f","repo":"BerriAI/litellm","slug":"user-with-id-partition-unknown-ids-0-does-not","errorCode":null,"errorMessage":"User with ID '{partition.unknown_ids[0]}' does not exist. Please create the user first via POST /Users before adding to group.","messagePattern":"User with ID '(.+?)' does not exist\\. Please create the user first via POST /Users before adding to group\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/management_endpoints/scim/scim_v2.py","lineNumber":652,"sourceCode":"    user to drop.\n\n    Raises:\n        HTTPException: 400 when a member id is empty, or when scim_upsert_user is\n        False and a member id is neither an existing user, an existing team, nor a\n        member declared to be something other than a user.\n    \"\"\"\n    classified: Final = tuple([await _classify_group_member(member, prisma_client) for member in members])\n    partition: Final = _partition_classified_members(classified)\n\n    for skipped in partition.skipped:\n        verbose_proxy_logger.info(\n            \"SCIM: ignoring non-user group member '%s' (%s); LiteLLM teams contain users only\",\n            skipped.value,\n            skipped.reason,\n        )\n\n    if partition.unknown_ids and not await _get_scim_upsert_user_setting():\n        raise HTTPException(\n            status_code=400,\n            detail={\n                \"error\": f\"User with ID '{partition.unknown_ids[0]}' does not exist. \"\n                \"Please create the user first via POST /Users before adding to group.\"\n            },\n        )\n\n    creations: Final = tuple(\n        [\n            (user_id, await _create_user_if_not_exists(user_id=user_id, created_via=created_via))\n            for user_id in partition.unknown_ids\n        ]\n    )\n    created_users: Final = tuple(created for _, created in creations if created is not None)\n\n    return GroupMemberExtractionResult(\n        existing_member_ids=partition.resolved_ids,\n        created_users=created_users,","sourceCodeStart":634,"sourceCodeEnd":670,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/scim/scim_v2.py#L634-L670","documentation":"After classifying group members, any member id that is neither an existing user, an existing team, nor a declared non-user blocks the whole group PATCH (when scim_upsert_user is false): the code raises 400 naming the first unknown id and instructing the client to create the user via POST /Users first.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/scim/scim_v2.py:652 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the user first via POST /Users before adding to the group."],"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"}