java - How to fetch user who are disabled in LDAP active directory -


i have write java code find if particular user in active directory enabled or disabled.

you can inspect useraccountcontrol bit flag attribute. 2nd bit indicates if user disabled (see remarks section on attribute's msdn page.)

the easiest use bitwise filter in ldap query:

(useraccountcontrol:1.2.840.113556.1.4.803:=2) 

this filter expression return disabled accounts (see more on usage of bitwise filters in this article).


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -