# How to stop searching for user found in LDAP with higher priority?

**URL:** <https://forum.keycloak.org/t/how-to-stop-searching-for-user-found-in-ldap-with-higher-priority/20989>\
**Category:** Getting advice\
**Tags:** authentication, user-federation, ldap\
**Created:** [March 22, 2023, 1:46am UTC](https://forum.keycloak.org/t/how-to-stop-searching-for-user-found-in-ldap-with-higher-priority/20989 "2023-03-22T01:46:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csi2345](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/csi2345/32/8033_2.png) [@csi2345](https://forum.keycloak.org/u/csi2345)\
**Post date:** [March 22, 2023, 1:46am UTC](https://forum.keycloak.org/t/how-to-stop-searching-for-user-found-in-ldap-with-higher-priority/20989/1 "2023-03-22T01:46:54Z")

</div>

Hello

I am using several LDAP connections to Keycloak.  
One problem is that sometimes the connection to an LDAP server is unstable.  
For example, if I have LDAP servers named A to E and the connection between Keycloak server and C becomes unstable, I cannot search for users in Keycloak.  
When I checked the log, Keycloak found a user in A, but since then, it has been looking up users in all LDAPs of B~E.  
Meanwhile, Keycloak fails to communicate with C, occurring in a java.net.UnknownHostException error.  
I want to stop searching further when the user is searched in A.  
Is there a way to solve this problem?

Thank you
