ACUL MFA screen - User metadata fields availability

Hello, good morning. I have been implementing the ACUL screens journey and everything has been going fine so far. I have only encountered an issue that haven’t been able to solve.

We are creating users dynamically via the management api and sending them a reset password afterwards. Once their password has been updated and they want to login for the first time, the login screen is shown. Then, the mfa-sms-enrollmentscreen popus up.

I have been carefully reading and following the ACUL docs and have seen that the MfaSmsEnrollmentInstance should have the following properties:
https://auth0.com/docs/customize/login-pages/advanced-customizations/reference/mfa/mfa-sms#properties-2

What I need is to somehow get the user_metadata fields on the mfa-sms-enrollment screen, as when I try to log them, they are always null.

I have tried:

import MfaSmsEnrollmentInstance from “/auth0-acul-js/mfa-sms-enrollment”;

export const useMfaSmsEnrollmentManager = () => {
  const mfaSmsEnrollmentInstance = useMemo(
    () => new MfaSmsEnrollmentInstance(),
    []
  );

  console.log({ user: mfaSmsEnrollmentInstance.user }); // The user object is displayed with the userMetadata property as null

  const metadata_prop_test = mfaSmsEnrollmentInstance?.user.userMetadata?.test;
  console.log({ metadata_prop_test }); // Undefined

...

I have double checked and the test field exists on the user_metadata object of the user:

{
“blocked”: false,
“created_at”: “2025-11-27T16:31:37.707Z”,
“email”: “email@email.com”,
“email_verified”: false,
“family_name”: “zzz”,
“given_name”: “zzz”,
“identities”: [
{
“connection”: “Username-Password-Authentication”,
“provider”: “auth0”,
“user_id”: “0000000000000000000”,
“isSocial”: false
}
],
“name”: “zzz”,
“nickname”: “zzz”,
“phone_number”: “+34000000000”,
“phone_verified”: false,
“picture”: "zzz"
“updated_at”: “2025-12-01T09:11:23.253Z”,
“user_id”: “auth0|0000000000000000000”,
“user_metadata”: {
“test”: “12345”, // This is the field that I need
},
“last_ip”: “zzz”,
“last_login”: “2025-12-01T09:11:23.252Z”,
“logins_count”: 1,
“blocked_for”: [],
“guardian_authenticators”: [],
“passkeys”: []
}

I have also tried adding a trigger on the post login action but it is not fired until the mfa has been completed. I don’t know if I’m missing something, but I have run out of ideas.

Any help would be highly appreciated. Many thanks.

Hello, I’m answering my own question one day later. I don’t know how could I miss it on the first place.

The Universal Login context can be customized: Configure ACUL Screens

This way I can specify which fields are being sent to the client, so my issue is now solved.

Hopefully this can help any other people that find themselves in a similar situation. :slightly_smiling_face:

Hi @vvidal

Thanks for sharing the solution and letting us know it got resolved!

If you ever have any other questions, feel free to let us know by posting here again!

Kind Regards,
Nik

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.