Managing users

This topic provides guidance on the following actions:

Once you’ve logged into Keycloak admin, it’s possible to perform various actions, connected with user management. It’s important to mention that there are two set of users with two respective realms:

  • master — users who can manage the Keycloak itself

  • dev — Team Edition users

View existing users

Follow these steps to view a list of existing users currently present in Team Edition:

  1. Log in to Keycloak as the admin user.

  2. Select DEV realm.

  3. Go to the Users section on the left.

  4. Click View all users.

Create a user

Follow these steps to create a user:

  1. In Keycloak, go to the Users section on the left.

  2. Click Add user.

  3. Enter the username and ensure Email Verified is ON.

  4. Click save, then navigate to the Credentials tab.

  5. Ensure Temporary is OFF.

  6. Click Set Password.

Add a new master realm admin user/Reset password

Follow these steps from the command line to add a new admin user to the master realm or to reset your admin password if you’re locked out or have forgotten your password.

  1. Exec into the Keycloak container:

    # Replace <KEYCLOAK_CONTAINER_ID> with your keycloak container ID
    docker exec -it <KEYCLOAK_CONTAINER_ID> /bin/bash
  2. Create a user:

    # Replace <USERNAME> with your username and <PASSWORD> with your password
    /opt/jboss/keycloak/bin/ -u <USERNAME> -p <PASSWORD> -r master --roles=admin
  3. Restart the server. Restarting the server will delete the container and any current state:

    /opt/jboss/keycloak/bin/ -Djboss.socket.binding.port-offset=100
  4. Log in to Keycloak from the following URL:

    #Replace <FQDN> with your fully qualified domain name