I want to check an organizational unit (OU) is available in LDAP using Java code.
My requirement is from this base dn ou=people,dc=agroup,dc=com i have fetch a user based on some attribute eg: email attribute is not null and i have to move those users to new base dn "dc=com to dc=1a_archive,dc=com" using java and in the destination basedn if the ou is not available,(eg :ou=nce,o=hotel,ou=company) is it possible to create these ou of a user in the destination base dn with java code? if yes please provide the solution