User federation, check only the first user provider

Hi there,

It’s now a couple of hours I’m struggling with my 2 custom user providers.
Both of them are working properly on there own but once I add both of them to the identity federation, it checks the first one but never the second one.

Anyone face something like that ?

1 Like

I am facing a similar issue https://stackoverflow.com/questions/62714976/how-to-initialize-several-userproviders-in-keycloak

@megicivovic any luck ?

It was not possible to have two user providers (Keycloak doesn’t allow it internally) , so we just extended the methods we needed and just called super implementation in the rest.

https://www.keycloak.org/docs/latest/server_admin/#dealing-with-provider-failures

The reason why Keycloak does not fail over if a Storage Provider lookup fails is that user databases often have duplicate usernames or duplicate emails between them. This can cause security issues and unforeseen problems as the user may be loaded from one external store when the admin is expecting the user to be loaded from another.