How to get the group name and Infos of a user?


I use fowable as jar inside a java application.
I created a user (with flowable-idm web application) id=“eric”, password=“mypasswd” which belongs to the “grp1” group => ok

procesEngine.getIdentityService().checkPassord(login,password) works fine => ok

Issue : now i need to get the group name to which the user belongs.
I tried to use : procesEngine.getIdentityService().getUserInfo(login,key) => KO : how to get the key for a given user ??

Thanks in advance


You can use IdentityService to get the group of a user.
Sample query : identityService.createGroupQuery().groupMember(“userId”).list() to get Group class object. Then you can do group.getId() to get Id of the group.


It works fine, thank you Arpit.

And for getting info about a user, a solution is :
List listusers = processEngine.getIdentityService().createUserQuery().userId(“my_login”).list();
for(User u : listusers){

And Happy New Year 2018 !