# Providing a password for user federation LDAP username

**URL:** <https://forum.keycloak.org/t/providing-a-password-for-user-federation-ldap-username/10017>\
**Category:** Getting advice\
**Tags:** ldap\
**Created:** [July 12, 2021, 2:15pm UTC](https://forum.keycloak.org/t/providing-a-password-for-user-federation-ldap-username/10017 "2021-07-12T14:15:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tlemons](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tlemons](https://forum.keycloak.org/u/tlemons)\
**Post date:** [July 12, 2021, 2:15pm UTC](https://forum.keycloak.org/t/providing-a-password-for-user-federation-ldap-username/10017/1 "2021-07-12T14:15:40Z")

</div>

Hi

I’ve been able to get the keycloak ‘Add user federation provider’ form to successfully execute the ‘Test connection’ function (which is just a TCP connect test). My current problem is that I don’t find a way to specify a LDAP query username / query password pair (only the query username field is provided), so the connection to my team’s OpenLDAP server rejects the bindRequest (as it should).

I’ve looked through the documentation, but don’t find this discussed, and my initial Google searches haven’t yielded any fruit.

Thoughts/ guidance, please!

Thanks  
tl

---

<div class="post-metadata">

**Author:** ![tlemons](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tlemons](https://forum.keycloak.org/u/tlemons)\
**Post date:** [July 12, 2021, 6:54pm UTC](https://forum.keycloak.org/t/providing-a-password-for-user-federation-ldap-username/10017/2 "2021-07-12T18:54:36Z")

</div>

I did find my own answer, when using the keycloak REST API. When using ‘/auth/admin/realms/master/testLDAPConnection’, ‘bindDn’ contains the query username and ‘bindCredentials’ contains the query password.
