My guess is that the old data is still around in Keycloak's cache. Some options are:
- Restart Keycloak
- Clear the cache
- Turn off caching permanently
For #2, you can clear the user or realm caches at runtime on the "Realm Settings -> Cache" section of the keycloak admin page:
For #3, you can read the below source for instructions: https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.0/html/server_installation_and_configuration_guide/server_cache_configuration
8.3. Disabling Caching
To disable the realm or user cache, you must edit the keycloak-server.json file in your distribution. Where this file lives depends on your operating mode Here’s what the config looks like initially.
"userCache": {
"default" : {
"enabled": true
}
},
"realmCache": {
"default" : {
"enabled": true
}
},
To disable the cache set the enabled field to false for the cache you want to disable. You must reboot your server for this change to take effect.
8.4. Clearing Caches at Runtime
To clear the realm or user cache, go to the Red Hat Single Sign-On admin console Realm Settings→Cache Config page. On this page you can clear the realm cache or the user cache. This will clear the caches for all realms and not only the selected realm.