I'm trying to search in a LDAP server all the users that have some profiles. So far I'm able to get all the users with a profile, but I'm unable to do the same with multiples roles. So the following code works
[...]
filterExpr = "(&(objectclass=person)(memberOf={0}))";
String rol = "myRol";
Object parameters[] ={rol};
context.search(distinguishedName, filterExpr, parameters, controls);
but the following code does not
filterExpr = "(&(objectclass=person)(memberOf={0}))";
String rol = "myRol";
String roles[] = {rol};
Object parameters[] ={roles};
context.search(distinguishedName, filterExpr, parameters, controls);
It also doesn't work if there are more than one rol in the array. What am I doing wrong?