I'm using Java ldaptive library to communicate with Active Directory via LDAP protocol. My problem is as follows: I need to have password reset feature, honoring password history and complexity requirements, but ignoring minimum password age rule. I perform password reset using admin account:
modifyRequest = new ModifyRequest(userLdapEntry.getDn(),
new AttributeModification(
AttributeModificationType.REPLACE,
new UnicodePwdAttribute(password)));
modifyRequest.setControls(new LdapPolicyHintsControl(getADPolicyHintsEnforceFlag(), false));
new ModifyOperation(connection).execute(modifyRequest);
The control added is documented on Microsoft website as control enforcing password history requirements link
However, as suggested in this answer, it enforces also minimum password age rule, which is against the documentation.
Any idea how to make it work as described in documentation?