How to get all CandidateGroup-Tasks of current user?

Hi,
we are trying to integrate the Camunda tasks to our intranet inbox. We configured Camunda to use our LDAP for user and groups.

User tasks (CandidateUser) can be received by doing a REST call http:///engine-rest/task?candidateUser=john.doe@mycompany.com

I get an JSON-Array with the following content:

    {
        "id": "7fc5fe5a-6d3c-11ec-a3d3-14abc57849c9",
        "name": "Manager confirmation",
        "assignee": null,
        "created": "2022-01-04T09:58:35.000+0000",
        "due": null,
        "followUp": null,
        "delegationState": null,
        "description": null,
        "executionId": "7fc2a2f3-6d3c-11ec-a3d3-14abc57849c9",
        "owner": null,
        "parentTaskId": null,
        "priority": 50,
        "processDefinitionId": "myWorkflow:1:702aeff1-6d3c-11ec-a3d3-14abc57849c9",
        "processInstanceId": "7fc2a2f3-6d3c-11ec-a3d3-14abc57849c9",
        "taskDefinitionKey": "Activity_SelectSystems",
        "caseExecutionId": null,
        "caseInstanceId": null,
        "caseDefinitionId": null,
        "suspended": false,
        "formKey": "http://localhost:4200/myGUI/3&taskId=7fc5fe5a-6d3c-11ec-a3d3-14abc57849c9",
        "camundaFormRef": null,
        "tenantId": null
    }

So far so good.

The users in our LDAP are assigned to several LDAP groups.

For example: The user John Doe is member of

  • Group A
  • Group B
  • Group C (which is assigned to Group D)

If there are tasks for Group A, B, C and D can I get all tasks in one REST call?

If so, will the result be extended with the group of the task (Group A, B, C or D)?

Or is the only way to get all LDAP groups for the user John Doe direct from the LDAP and then do a http:///engine-rest/task?candidateGroup=GroupA call for Group A and so on?

Thank you very much in advance.

Rainer

Hi @Ironarrow,

You can use candidateGroups query param and pass a comma separated list of group names.

/task?candidateGroups=GroupA,GroupB,GroupC

Hi @Ironarrow,

Be informed that using candidateUser param, returns tasks that are offered to the given user or to one of his groups

Hi @hassang,

thank you for your answer. You are right. The tasks for the user and his groups can be requested by the candidateUser-call. I just set the value for candidateGroup wrong. I used the email Address of the group and not the name of the group.

So there is just one more thing: When I get all the user and group tasks for the selected user, how can I differ, if the task is a user task or a task for Group A, B, C etc? In the JSON structure of the response there is no information about it.