Remove "Update Account Infromation" form after first login

Hello everyone, I have set up my keycloak to use Azure AD.

When testing my app, after I login for the first time, using my Microsoft account, I get redirected to a page that contains the form shown in the picture below :

and right after the user fills the form and submits, he will be redirected to the app.
My question is, is there a way to remove the form, and redirect the user directly to the app.

Thanks in advance :slight_smile:

This is being shown because those user profile elements are currently set to required. If you enable the declarative user profile (Realm SettingsGeneral) and then go to the User profile tab, you can go into each element (email, first name, last name) and turn Required to OFF. Then the update profile screen you are seeing won’t be triggered.

Thank you for your response,
Actually I couldn’t find User profile tab under Realm SettingsGeneral.

I’m using Keycloak 19.0.3

DECLARATIVE_USER_PROFILE is a preview feature, and must be turned on. Information on how to turn on preview features is here: Enabling and disabling features - Keycloak

1 Like

I have enabled it, but I still can’t find User profile tab under Realm SettingsGeneral .

You have to enable it in that tab:

1 Like

Well, I couldn’t find it, even though I have tried to enable it in 2 different machines, the general tab is always shown like the picture below :

Do you see it in the Realm info when you log into the master realm?

I used the following command to enable the feature :

bin/kc.bat build --features=declarative-user-profile

but it doesn’t show up in the “enabled features”

Did I use the wrong command ?

Try all preview features

bin/kc.[sh|bat] build --features=preview

Despite it being out for a while, I still find the build, start-dev and start mechanism of building and starting keycloak to be buggy and confusing.

1 Like

I have found that “email” and “username” required fields are set to “OFF” by default, so I didn’t change them, whereas “firstName” and “lastName” are set to “ON” by default, so I have set them to “OFF”. But the Update Account Information screen is still showing and the “email” and “username” fields have the “*” that stands for required.

Do you want the email to be the username? Then use a mapper to set it. Otherwise, the user will be required to set it.

@amrabet I believe there is another alternative than using the declarative profile. You create a copy of the first broker flow and disable the review profile from it, and set it as the used flow in the identity provider section → Microsoft.

Here is an example for twitter, but the procedure is the same: Keycloak tip: disabling the review profile step when using twitter as an identity provider | imager200


Thank you so much @zak it worked !