Skip to content

Create user

This page explains how to create a user, resolve common validation failures, and optionally assign an initial permission.

Open the Users page

  1. Log in to the IAM application.

  2. In the left navigation pane, select Users. You should see the User List and the Add User button.

Start creating a user

  1. Click the Add User button to create a user.

    Users list — Add User button

    Figure 1. Users list — Add User button

  2. The Create User form opens.

    Empty Create User form

    Figure 2. Empty Create User form

Create user - validation failures

Username and Email are required. If you click Save without entering them, the form shows validation errors.

  1. Leave Username and Email empty.

  2. Click Save.

    Empty form — click Save

    Figure 3. Empty form — click Save

  3. Failure message shown on the form: "This field is required" (under Username and Email).

    Missing required field validation messages

    Figure 4. Missing required field validation messages

    Username field marked as required

    Figure 5. Username field marked as required

  4. Enter an invalid email address (for example: not-an-email).

  5. Optionally fill First Name / Last Name.

  6. Click Save.

    Form with invalid email entered

    Figure 6. Form with invalid email entered

  7. Failure message shown on the form: "\"not-an-email\" is not a valid email address".

    Invalid email validation message

    Figure 7. Invalid email validation message

Create user — success

  1. Click Add User to open a fresh Create User form.

  2. Enter the Username.

    Enter Username

    Figure 8. Enter Username

  3. Enter the Email.

    Enter Email

    Figure 9. Enter Email

  4. Enter First Name, Last Name, and Phone Number as needed.

  5. Leave "Send Reset Password Email" unchecked unless you want a reset email sent.

    Note

    Send Reset Password Email controls how the new user gets a password:

    • Checked: A password reset email is sent so the user can set a password.
    • Unchecked: No email is sent. A Keycloak administrator can set the user's credentials explicitly in Keycloak, or an IAM administrator can trigger a password reset email for the user as described in Reset a user password.

    Create User form completed

    Figure 10. Create User form completed

  6. Click Save.

    Click Save to create the user

    Figure 11. Click Save to create the user

  7. Success message: User "iron.man" was added

    Success message after creating the user

    Figure 12. Success message after creating the user

  8. Confirm the user appears in the User List.

    New user visible in the User List

    Figure 13. New user visible in the User List

Assign optional permissions when creating a user

When you create a user you can attach an initial (optional) permission on the Create User form. The permission you assign must match your own scope: if your permissions are unscoped (not tied to any entity), you can only assign unscoped optional permissions; if your permissions are scoped to specific entities, the optional permission must stay within that same scope. If the requested scope is wider than your own, creating the user is rejected.

Note

Whether an initial permission is required depends on your own permissions:

  • Unscoped: If you have unscoped Manage User permission, then creating a user without an initial permission is allowed. Assigning a permission at creation is optional in this case.
  • Scoped only: If you do not have unscoped Manage User permission, then an initial permission is required at the time of user creation, and it must match your entity or entity group scope. The user cannot be created without that permission.
  1. On the Create User form, fill in the user details as usual.

  2. Under Initial permission, click Add Permission to open the Add Permission dialog.

    Add Permission (optional)

    Figure 14. Add Permission (optional)

    Add Permission dialog opened from the Create User form

    Figure 15. Add Permission dialog opened from the Create User form

  3. Select the Module (IAM-Module), then choose the scope type Unscoped/Entities/Entity groups (to create a scoped permission in this example: choose Entities -> HSBC Bank (1)), then choose the Action (View) and Resource (Users).

    Scoped optional permission completed (IAM-Module / View / Users / HSBC Bank)

    Figure 16. Scoped optional permission completed (IAM-Module / View / Users / HSBC Bank)

  4. Click Save to close the dialog. The optional permission now appears under Initial permission on the Create User form.

    Scoped optional permission shown on the Create User form

    Figure 17. Scoped optional permission shown on the Create User form

  5. Click Save to create the user. Because the signed-in user has only unscoped permissions, assigning a scoped optional permission is rejected and the user is not created. Failure message: “Failed to create user — Your permissions create access does not cover the requested scope.”

    Failure — an unscoped user cannot create a user with a scoped optional permission

    Figure 18. Failure — an unscoped user cannot create a user with a scoped optional permission

  6. To fix this, edit the optional permission: click the pencil (Edit) icon next to it. The Update Permissions dialog opens.

    Update Permissions dialog (edit the optional permission)

    Figure 19. Update Permissions dialog (edit the optional permission)

  7. To create an unscoped permission, choose Scope type as "Unscoped", then re-select the Action (View) and Resource (Users).

    Optional permission set to Unscoped

    Figure 20. Optional permission set to Unscoped

  8. Click Save to close the dialog. The optional permission now shows as unscoped on the form (“The new user will not be assigned to any entity”).

    Unscoped optional permission shown on the Create User form

    Figure 21. Unscoped optional permission shown on the Create User form

  9. Click Save to create the user. The user is created successfully.

    Note

    The scope of an optional permission assigned during user creation is validated against the creating user’s own scope. An unscoped user can assign only unscoped optional permissions; a scoped user can assign optional permissions only within their own entity scope. Choose “Unscoped” to make a permission unscoped, or choose an entity or entity group within your scope to keep it scoped.