Open Closed

Identity management | Users | Actions | Claims: Claim can be saved without entering mandatory values and the Type dropdown contains no options #10862


User avatar
0
douwm created

Description: In the Claims modal under Administration > Identity Management > Users, the system allows users to save a claim without entering any values in the mandatory fields. Additionally, the Type dropdown does not contain any selectable values. Despite this, the claim can still be saved, and a "Saved Successfully" toast message is displayed. Steps to Reproduce:

Navigate to Administration > Users. Click on the Actions button for the role and open the Claim modal Observe that the Type dropdown contains no values. Leave the Type and Value fields blank Click the Save button. Observe the behavior. Actual Result: The claim is saved successfully and a "Saved Successfully" toast message is displayed even when no values are entered in the Claim modal fields, while the Type dropdown contains no available options for selection. Expected Result: The system should validate all mandatory fields and prevent the claim from being saved when required values are missing. Appropriate validation messages should be displayed for each mandatory field, and the Type dropdown should be populated with valid claim types. If no claim types are available, the system should display an appropriate message instead of allowing an empty dropdown.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • In ABP Identity Module (Pro), the User Claims modal’s Type dropdown is not a free-text list; it is populated from the Claim Type Management definitions. If you have no claim types defined, the dropdown will appear empty (exactly like your screenshot). ABP’s documentation states: “Claim types are retrieved from the claim list defined in the Claim Type Management page.”
    • So the root cause of the empty dropdown is: there are no claim types configured (or the Claim Type Management page is not available/used in your app).

    Fix the empty “Type” dropdown

    1. Go to Administration → Identity Management → Claim Type Management (name may vary slightly by UI/package).
    2. Create at least one Claim Type (e.g. department, employee_id, etc.).
    3. Return to Administration → Identity Management → Users → Actions → Claims and reopen the modal. The Type dropdown should now be populated.

    Prevent saving empty claims (mandatory validation)

    • The ABP UI behavior you see (saving while blank) is typically possible only if the backend endpoint accepts empty/invalid input (or the UI is not enforcing validators). To make this definitive and enforced:
      1. Enforce server-side validation in the application service/endpoint that creates user claims: ensure the DTO has required validation (e.g., [Required]) for Type and Value (and/or validate manually and throw).
      2. After server-side validation is in place, the UI will receive a validation error and should stop showing “Saved Successfully” for empty inputs.

    If you only configure claim types (first part), you’ll also naturally reduce the chance of empty “Type” because users can pick a real type.

    Quiet reference:

    • https://abp.io/docs/latest/modules/identity-pro
    • https://abp.io/docs/10.6/modules/identity-pro

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi,

    The Type dropdown lists the claim types defined in your application, and it's empty because no claim type has been created yet. You can create them on Administration > Identity management > Claim types. If that menu item isn't there, check the AbpIdentity.ClaimTypes permission of your role - it's a host side permission, so tenant users don't get it.

    Nothing is actually saved when you leave both fields blank. No empty claim is created for the user, the toast only means the request went through.

    We'll change the modal to show a message instead of an empty dropdown when there is no claim type defined.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 07:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.