{"record":{"id":"a831dc9d1873a302","repo":"flowable/flowable-engine","slug":"could-not-find-a-group-with-id","errorCode":null,"errorMessage":"Could not find a group with id ''.","messagePattern":"Could not find a group with id ''\\.","errorType":"http","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/BaseGroupResource.java","lineNumber":42,"sourceCode":"/**\n * @author Frederik Heremans\n */\npublic class BaseGroupResource {\n\n    @Autowired\n    protected RestResponseFactory restResponseFactory;\n\n    @Autowired\n    protected IdentityService identityService;\n    \n    @Autowired(required=false)\n    protected BpmnRestApiInterceptor restApiInterceptor;\n\n    protected Group getGroupFromRequest(String groupId) {\n        Group group = identityService.createGroupQuery().groupId(groupId).singleResult();\n\n        if (group == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a group with id '\" + groupId + \"'.\", User.class);\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessGroupInfoById(group);\n        }\n        \n        return group;\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":52,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/BaseGroupResource.java#L24-L52","documentation":"BaseGroupResource.getGroupFromRequest resolves a group by id using identityService.createGroupQuery().groupId(groupId). If no group exists with that id, it throws FlowableObjectNotFoundException. All group REST endpoints (GET/PUT/DELETE /identity/groups/{groupId}) funnel through this helper.","triggerScenarios":"GET, PUT or DELETE /identity/groups/{groupId} where groupId does not match any row in ACT_ID_GROUP.","commonSituations":"Group deleted by another admin before the call; id is case-sensitive and was sent with wrong casing; group lives in a different identity database (LDAP/AD-backed setup where groups are not in Flowable's tables); stale id cached in the client application.","solutions":["Verify the group id: SELECT * FROM ACT_ID_GROUP WHERE ID_ = '<id>' or GET /identity/groups and inspect the id values.","Check id casing/exactness — group ids are compared literally by the query.","If using LDAP or an external identity service, confirm group synchronization into Flowable's identity tables is configured and has run.","Handle 404 in the client and refresh group lists instead of retrying with the same id."],"exampleFix":"// before\nclient.delete(\"/identity/groups/sales-teams\");\n// after: confirm id first\ngroupService.list().stream()\n    .filter(g -> \"sales-team\".equals(g.getId()))\n    .findFirst()\n    .ifPresent(g -> client.delete(\"/identity/groups/\" + g.getId()));","handlingStrategy":"try-catch","validationCode":"boolean exists = client.list(\"/identity/groups\").stream().anyMatch(g -> groupId.equals(g.getId()));","typeGuard":null,"tryCatchPattern":"try {\n    client.delete(\"/identity/groups/\" + groupId);\n} catch (HttpClientErrorException e) {\n    if (e.getStatusCode() == HttpStatus.NOT_FOUND) {\n        log.warn(\"Group {} already gone\", groupId);\n    } else throw e;\n}","preventionTips":["Fetch ids from GET /identity/groups instead of storing them long-term.","Respect id casing exactly.","Verify LDAP/identity sync if groups are managed externally."],"tags":["rest-api","identity","group","not-found"],"backgroundTag":"entity-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}