On 12/03/2019 15:14, Lior Dotan wrote:
> This is how I call my filter function:
> <delete>js:deleteFilterOUs(dstBean.getDatasetFirstValueById("mail"))</delete>
>
> In a different file I have put this code:
> function deleteFilterOUs(mail) {
> var filter = "mail=" + mail;
> var results = srcLdap.search(srcLdap.base, filter);
> java.lang.System.out.println(results);
> java.lang.System.out.println(mail);
> return false;
> }
>
> I can see that the correct mail is printed but results is null.
> Did I call the search function with the correct parameters?
> Also, I didn't quite understand your remark about search() appending
> the contextDn.
Try srcLdap.search("", filter). LSC will append contextDn to the base
parameter. If you set it, the research will not work as it will look into base
+ contextDN (the part in connection URL). It could also be a specific OU
("ou=ou1"). It's easier to debug this if you can see the incoming request
arriving in your LDAP directory.
Also, I believe your filter should be formatted like this : "(mail=" + mail +
")", according to LDAP filter specification.
You have choose to use mail as pivot attribute for clean, make sure it cannot
be changed in source and that it will always be unique within all branches,
sAMAccountName maybe less error prone unless you know what you're doing.
Regards
--
Soisik Froger | Software Architect
[email protected]
Worteks | https://www.worteks.com
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users