DefaultUserProfile: custom attributes are removed by default?

Hey,

after upgrading keycloak 12 to 14, we noticed our custom attriburtes were deleted every time there was an update…

We see that in DefaultUserProfile the default is to delete all attributes except for the main once (email, etc)…

Nou we override the update and set the removeAttributes to false again…

I can not find any information why this is done, shouldn’t it be in the migration manual or so ??

thanks,
Rob

This is probably due to the introduction of the declarative-user-profile in KC 14. Agreed that it is a bad default to get rid of existing custom attributes. Not sure why that decision was made. Take a look at the new User Profile documentation: Server Administration Guide

1 Like

We ran into the same issue. So I tried setting up the new declarative-user-profile and added all custom attributes we use. But when I now create a new customer all the keys of my custom attributes are present but the values are empty!? And in addition all predefined attributes (username, email, firstname, lastname) are missing completely. Any clues on that? Is there a simple way to set up the old (keycloak 10, 12, 13) behaviour?