Create a user from a Keycloak provider

Hello everyone,

I’m using Keycloak 16.1 and I would like to create a user account programmatically from an “authenticator” provider deployed in a JAR file. I know I could use the Keycloak java admin client, as shown here, I tested it and it works, but it requires us to authenticate with a client and a Keycloak user. That seems not ideal as we are already in the Keycloak Java context (same JVM).

More generally, is there some Java services/API to make some operations on users, groups, realms, etc. from Keycloak providers or we have to use the Java admin client ?

The question has already been asked here but doesn’t have any answer.

Thanks in advance :slight_smile:

Perhaps this will help you to get an idea:

1 Like