Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

LDAP OU Definition Filter

Supriya20
Tera Expert

Hi All,

 

We want to exclude empty user email accounts while importing users through LDAP.

 

Below is the filter query currently we are having

(&(objectClass=person)(sn=*) (!(objectClass=computer))(!(ou=Leavers))(!(employeenumber=888888))(!(employeenumber=999999))(!(employeenumber=444444)))

 

Please let me know, How can I filter empty email accounts.

 

Thanks,

Supriya

1 REPLY 1

Jaspal Singh
Mega Patron
Mega Patron

Try below

(&(objectClass=person)(sn=*)(mail=*) (!(objectClass=computer))(!(ou=Leavers))(!(employeenumber=888888))(!(employeenumber=999999))(!(employeenumber=444444)))