OIDC user mapping for first time login


Is there a way to auto-populate (all) these fields when logging in using OIDC / identity provider the first time?

I tried using mappers on my identity provider settings, but it doesn’t work.

Any help is much appreciated. Thanks!

The mapper approach is correct. You should be able to get the values for those fields from the IdP. Have you checked to see if you have requested the right scopes in your IdP setup (“Default Scopes”) such that you get those values? Usually, you will need openid email profile.

And you probably don’t need the mappers if 1. the scopes are set properly, and 2. the IdP is compliant, as Keycloak will map those values automatically.


It seems that my identity provider configuration has no Default Scopes defined.
After setting it to email profile and adding them as default client scopes on my realm, the user sync was successful (no update account information page anymore).

Thanks for the clues provided, especially on the the scopes are set properly part. Much appreciated.