LDAP Identity Provider get Users of Candidate Group

Hello,

I am running a Process Engine on a Wildfly Server.
I managed to connect it via LDAP. Login and everything works.

What i want to do:
I have some Usertasks beeing assigned to a fixed user and some with a candidate group.
Now i wrote a Java-Listner which i think SHOULD get me the useres that are in the candidate Group.
The Listener works fine i i query “assignee” in it.

but once i try this:
User user = indentityService.createUserQuery().userId(il.getUserId()).singleResult();
i double checked il.getUserId() → It is the same as the one i can see in camuda Admin and there are at least two users in that group.

nevertheless i get the following Exception

Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001E5, problem 2001 (NO_OBJECT), data 0, best match of: ’ ’ ]; remaining name ’ ’

Can anyone help out?

Kind regard,

Philipp

@Husi Is the il.getUserId() return type String?

Was using javascript for my usecase, but I assume it’s going to be pretty similar.
Code:

identityService = execution.getProcessEngineServices().getIdentityService();
user_id = identityService.getCurrentAuthentication().getUserId();
userList = identityService.createUserQuery().userId(user_id).list().toString();

No it does not since it is a group --> userid is null but group id is set …
i want to get a list of all the users in that group