User Profile attribute default value not persisted on user creation, missing in jwt user attribute
Author: Cyclone5Created Jul 1, 2026Updated Sep 30, 2026
Labelskind/bugpriority/importantarea/user-profileteam/core-iam
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
user-profile
Describe the bug
When a User Profile attribute has a default value configured, the default value is not written to the user_attribute table when a new user is created. As a result, the claim is missing from the JWT even though the client scope and protocol mapper are configured correctly. Only after saving the user via the Admin Console does the row get created in user_attribute and the claim appear in the JWT.
Version
26.6.4
Regression
- The issue is a regression
Expected behavior
The configured default value should appear in the jwt.
Actual behavior
On user creation, the default value is not applied automatically, so the claim is absent from the JWT.
How to Reproduce?
- Realm Settings → User Profile: add an attribute with a defaultValue, e.g. { "name": "profile_image", "defaultValue": "https://example.com/default.png" }
- Add a User Attribute protocol mapper for it to a client scope, mapped into the token
- Create a new user
- SELECT * FROM user_attribute WHERE user_id = 'XXX'; → no row
- Get an access token for the user → claim is missing
- Open the user in the Admin Console and just click Save (the profile image default value is visible here).
- Repeat steps 4–5 → row now exists and claim is present in the JWT
Anything else?
No response
Source: keycloak/keycloak