How to assign task to a specific group of users using Candidate groups?

Question

Hi,
I am using camunda 8 self-managed
I want to assign the task to a group of users only the user in that group should be able to claim the task in the tasklist.
below are the steps I followed. please look into it.

  1. in the bpmn

I have added team1 group name in Candidate groups

  1. In tasklist

I logged in with the user of another group (team2 group user adam)
in the above tasklist claim option is available for adam but he is not in team1 group

  1. in keycloak
    below is the proof that adam belongs to team2

please let me know if I am doing anything wrong. how can I use Candidate groups?
is this possible or not?
I have tried the same in camunda 7 also the result is the same.

thanks in advance