Set email and name after initial login/user creation

I need to be able to set both name and email after initial user creation / login. The OIDC provider I use only has a unique identifier for the users, but no name or email address.

I have created a post login form where I want the users to type in their name and email adress. I am able to add the information to the user_metadata property, but when trying to store it directly on the user in the “name” and “email” properties nothing happens. Flow is executed without any errors..

Anyone know if this is possible?

Hi @eff

Welcome to the Auth0 Community!

I will be testing this in the meantime on my end and will come back with some updates. Otherwise, could you please let me know how do you set those properties inside the Forms Flow that you are using?

Also, are these properties available under the user in the Dashboard after the login is complete?

Kind Regards,
Nik

Hi again!

As far as I have tested, it appears that when I am setting the values inside the email and name properties directly, both of them get populated accordingly as seen below:

It appears that the email property might not be passed to the ID Token because it is not an available attribute inside the database connection you are using, however, it is set inside the Dashboard. I would recommend to add the email attribute as well so that users can create an account using an username and email or you can add the email as a custom claim inside an action:

const namespace = 'user_email'
api.idToken.setCustomClaim(namespace, event.user.email);

Let me know if oyu have any other questions!

Kind Regards,
Nik

Hi. I checked the user in the dashboard and it did not have any of my information.

I tried like this:
{
“name”: “{{fields.full_name}}”,
“email”: “{{fields.email}}”
}

This worked:

{
  "user_metadata": {
    "name": "{{fields.full_name}}",
    "email": "{{fields.email}}"
  }
}

This is the flow I have used and I was able to sign up a user successfully with the information inside the form:

{
  "name": "{{fields.name}}",
  "email": "{{fields.email}}"
}

And this is the user JSON available in the Dashboard:

"name": "John Travolta",
    "nickname": "data_test",
    "picture": "https://cdn.auth0.com/avatars/da.png",
    "updated_at": "2025-06-10T15:31:20.394Z",
    "user_id": "auth0|{{user_id}}",
    "username": "data_test",
    "email": "data_test@test.com",
    "email_verified": false

I would advise to double check the names of steps inside the form to make sure the data is retrieved from the right place.

Kind Regards,
Nik

Was this done through OIDC integration, and part of the post-login trigger?

Oh, sorry, I must have missed the part where you stated that this is done through an OIDC connection. However, the results should be the same since the profile attributes should be the same inside an user who signed up through your application normally or retrieved through an IdP.

I will double check the results using different OIDC connections and provide you with an update nonetheless!

Kind Regards,
Nik

Hi again,

After some testing, it appears that the retrieved user profile cannot be modified through Auth0 directly. In order for the Management API to be able to modify user data, they would need to be stored via a Database Connection or Passwordless connection.

In order for your to update the user with such information, you either need to add these elements as user_metadata as you have attempted above or you would need to make an API call to the IdP in order to add these attributes to their profile so that they are retrieved after login (if the IdP can support them).

Sorry for the confusion created on this matter.

If you have any other questions, let me know!

Kind Regards,
Nik

We need a manual flow where the user inputs this information. The IdP does not provide this information, and will not do it either. There isn’t any APIs either. The problem with this is that the user list becomes completely useless as it just says “(empty) (empty)” on all the users.

Are there any other workarounds, or is this something that can be fixed?

I actually got it working! I had to change the sync frequency on the enterprise OIDC connection to “Only at first login”. This allows you to edit the root properties of the users :partying_face:

Thanks for letting us know!

I believe I must have missed that somehow when testing :sweat_smile:.

If you have any other issues, feel free to always let us know by posting on the community!

Kind Regards,
Nik