-1

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 Answers1

0
  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.

NubDev
  • 506
  • 11
  • Welcome to Stack Overflow, NubDev! Many or most of your 23 answers in the last two weeks appear likely to have been entirely or partially written by AI (e.g., ChatGPT). Please be aware that [posting AI-generated content is not allowed here](//meta.stackoverflow.com/q/421831). If you used an AI tool to assist with any answer, I would encourage you to delete it. We do hope you'll stick around and become a valuable part of our community by posting *your own* quality content. Thanks! – NotTheDr01ds Jul 13 '23 at 00:09
  • **Readers should review this answer carefully and critically, as AI-generated information often contains fundamental errors and misinformation.** If you observe quality issues and/or have reason to believe that this answer was generated by AI, please leave feedback accordingly. – NotTheDr01ds Jul 13 '23 at 00:09