You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that user import with credentials doesn't work when your realm has User Federation set up with an LDAP server.
The user is created, but the credentials are not set, leaving the user with no credentials set up.
0. Create LDAP server (e.g. OpenLDAP)
1. Create realm
2. Set up user federation with LDAP server
3. Attempt to import user with credentials to the LDAP server
Environment
Keycloak Version: 24.0.5
keycloak-config-cli Version: 6.1.5
Java Version: 21
Anything else?
No response
The text was updated successfully, but these errors were encountered:
I ran kcc with full debug logging and saw that the credentials are sent to the user creation API along with the user details.
I guess that when federating with LDAP this field is ignored by Keycloak?
Settings the credentials via the credentials API would work, as that is what the Keycloak Web UI uses when you reset a password in an LDAP-enabled realm
Okay, after some testing I did find out a way to bypass this issue, it is a bit annoying though.
I have to first import the user without credentials or with dummy credentials, then do another import where I add the credentials.
This forces kcc to use the User Update API which seems to accept adding credentials to the user on an LDAP-enabled realm.
In any case, it would be great if the user import with credentials on an LDAP-enabled realm use case could be supported.
Current Behavior
It seems that user import with credentials doesn't work when your realm has User Federation set up with an LDAP server.
The user is created, but the credentials are not set, leaving the user with no credentials set up.
Minimal kcc config example:
Expected Behavior
User is created with credentials imported.
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: