Recuperate organisation groups and roles

The error was caused by the fact that i had sub-groups in my organisation. And as apparently he don’t hundle this . So i deleted all sub-groups and left just groups, and it works . Thank you :slight_smile:

And for profil i did this :

if (field_priv_choix=="Administrateur") { apiAccessor.getProfileAPI().createProfileMember(2, user.getId(), group.getId(), role.getId()) } else if (field_priv_choix=="Utilisateur") { apiAccessor.getProfileAPI().createProfileMember(1, user.getId(), group.getId(), role.getId()) }