Is it possible to create a new User-Defined Identity Provider type that allows multiple instances?

(cross-posting from here Is it possible to create a new User-Defined Identity Provider type that allows multiple instances? · keycloak/keycloak · Discussion #29666 · GitHub)

I have a new generic identity provider type that I’ve implemented by extending AbstractIdentityProvider and AbstractIdentityProviderFactory. The identity provider is NOT a “social” identity provider, but an implementation of a protocol (similar to OIDC) that is commonly used by enterprise IAM systems. Thus it is necessary to allow multiple instances of this generic type for each Realm.

For this identity provider, I want:

  1. It to appear in the Admin UI in the section with “User-defined” identity provider types. :+1: This works as expected.
  2. To allow the user to specify an alias, as in the SAML/OIDC/KeycloakOIDC types, so that users can create multiple instances. :-1: I am unable to determine if this is possible, based on a review of the similar, user-defined types, and the Admin UI code that renders the IdP section. Does anyone know if this is possible, and if so, how to achieve it?

Thank you!

Hey, probably this will not help, but maybe you can try to use authNote (custom query param) with alias value based on clienId?
Or some UI form customization, also based on some info, show/hide IDP?