# Urgen help needed for password verification via LDAP

**URL:** <https://forum.keycloak.org/t/urgen-help-needed-for-password-verification-via-ldap/13808>\
**Category:** Miscellanaeous\
**Created:** [February 23, 2022, 12:13am UTC](https://forum.keycloak.org/t/urgen-help-needed-for-password-verification-via-ldap/13808 "2022-02-23T00:13:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jigneshmpatel](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jigneshmpatel/32/5126_2.png) [@jigneshmpatel](https://forum.keycloak.org/u/jigneshmpatel)\
**Post date:** [February 23, 2022, 12:13am UTC](https://forum.keycloak.org/t/urgen-help-needed-for-password-verification-via-ldap/13808/1 "2022-02-23T00:13:43Z")

</div>

We have been struggling from the morning about running existing key cloak.  
Keycloak version is 3.4.0 and we are seeing following error:

2022-02-22 23:53:34,436 INFO [org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator] (default task-30) pwdChangedTime size:1  
2022-02-22 23:53:34,440 WARN [org.keycloak.events] (default task-30) type=LOGIN\_ERROR, realmId=pm, clientId=pm, userId=40e6a574-af19-411d-afc2-ff852957770c, ipAddress=212.102.60.133, error=invalid\_user\_credentials, auth\_method=openid-connect, auth\_type=code, redirect\_uri=https://pm.icare.com:443/iCareEHRWeb/rest/ui/main, code\_id=9226f0e3-f7ef-4f2b-ab91-066b2fea3e7c, username=  
The error is coming from the following:

> <https://github.com/Abdul2/keycloack/blob/master/keycloack/services/src/main/java/org/keycloak/authentication/authenticators/browser/AbstractUsernameFormAuthenticator.java>

```
public boolean validatePassword(AuthenticationFlowContext context, UserModel user, MultivaluedMap<String, String> inputData) {
    List<CredentialInput> credentials = new LinkedList<>();
    String password = inputData.getFirst(CredentialRepresentation.PASSWORD);
    credentials.add(UserCredentialModel.password(password));
    if (password != null && !password.isEmpty() && context.getSession().userCredentialManager().isValid(context.getRealm(), user, credentials)) {
        return true;
    } else {
        context.getEvent().user(user);
        context.getEvent().error(Errors.INVALID_USER_CREDENTIALS);
        Response challengeResponse = invalidCredentials(context);
        context.failureChallenge(AuthenticationFlowError.INVALID_CREDENTIALS, challengeResponse);
        context.clearUser();
        return false;
    }

```

It seems for some reason key cloak is not connecting with LDAP for the password verification. But it was all working from a long time.
