why don't create an initial admin user in keycloak?

361 Views Asked by At

enter image description here

request url: http://localhost:8080/

request body form data: username: admin password: 12345 passwordConfirmation: 12345 stateChecker: HvbmSO7g6Qg13gLhqF-lStA_WBZDxOX6s5Yy3TB4XRg

error: POST http://localhost:8080/ 403 (Forbidden)

how to create an initial admin user in keycloak?

1

There are 1 best solutions below

2
NubDev On
  1. Access the Keycloak administration console by visiting the URL of your Keycloak instance (e.g., http://localhost:8080/auth/admin).

  2. Log in with the admin credentials provided during the Keycloak installation.

  3. Once logged in, navigate to the desired realm where you want to create the admin user. Realms are typically listed on the left-hand side of the administration console.

  4. In the realm settings, click on "Users" in the left-hand navigation menu.

  5. Click on the "Add User" button to create a new user.

  6. Fill in the required details for the admin user, including the username, password, and any additional attributes.

  7. Make sure to assign the "admin" role to the user. To do this, click on the "Role Mappings" tab, select the "admin" role, and move it to the "Assigned Roles" column.

  8. Save the user by clicking on the "Save" button.