Inconsistent User Metadata and Phone Number Returned on User Creation via Auth0 Management API

Description:

We are experiencing inconsistent behavior while creating users via the Auth0 Management API. Specifically, some requests are returning incomplete or incorrect user metadata and phone number values, even though the request payload is valid and consistent.


Example 1 – Unexpected Behavior

Request Payload:

json

CopyEdit

{
  "firstName": "Sajjad",
  "lastName": "Naveed",
  "email": "asksage@gmail.com",
  "phoneNumber": "0411111111"
}

Auth0 Response:

json

CopyEdit

{
  "created_at": "2021-05-10T05:45:33.760Z",
  "email": "asksage@gmail.com",
  "email_verified": false,
  "identities": [...],
  "name": "Sajjad Naveed",
  "nickname": "asksage",
  "picture": "https://s.gravatar.com/avatar/...",
  "updated_at": "2025-07-16T11:04:35.024Z",
  "user_id": "auth0|6098c87da7a2710068f5cea6",
  "app_metadata": {
    "stripeId": "cus_JzME9JG5SmWeu4"
  },
  "last_ip": "35.203.250.142",
  "last_login": "2024-08-05T08:32:16.816Z",
  "logins_count": 17
}

:backhand_index_pointing_right: Problem: user_metadata is missing, and phoneNumber is undefined.


Example 2 – Correct Behavior

Request Payload:

json

CopyEdit

{
  "email": "junaid@gmail.com",
  "phoneNumber": "0411111111",
  "firstName": "Junaid",
  "lastName": "Nadeem",
  "partnerId": "upcover"
}

Auth0 Response:

json

CopyEdit

{
  "created_at": "2021-09-14T15:56:15.605Z",
  "email": "junaid@gmail.com",
  "email_verified": false,
  "identities": [...],
  "name": "t tt",
  "nickname": "junaid",
  "picture": "https://s.gravatar.com/avatar/...",
  "updated_at": "2025-07-16T11:00:47.589Z",
  "user_id": "auth0|6140c61fce399d0068dcdb22",
  "user_metadata": {
    "phoneNumber": "0444444444"
  },
  "app_metadata": {
    "partnerId": "upcover",
    "stripeId": "cus_KE6Bq5g4Q2vmtN"
  }
}

:backhand_index_pointing_right: Expected Behavior: user_metadata.phoneNumber is correctly populated.


Observations

  • The same user creation logic yields different results.
  • Looks like a potential caching issue or metadata update failure within Auth0.
  • The user_metadata field is sometimes omitted entirely even when properly passed in the request.
  • The returned values do not match the data sent in the request.

Request

Could someone from the Auth0 team help identify why metadata and fields like phoneNumber are not being consistently persisted or returned? Is there a known caching layer or delay that might affect immediate reads after creation?

We’d appreciate any guidance or known workarounds to ensure reliability.

Thanks in advance!

Hi @junaid1,

Welcome to the Auth0 Community!

The phone_number property is valid and doesn’t need to be inserted into the user_metadata. Also, all parameters in the request body use snake_case instead of camelCase. You can find more information on the [Create a User] docs (https://auth0.com/docs/api/management/v2/users/post-users), and use it to test and check the body parameters. After that, try it in your application.

If you have any other questions, feel free to reach out.

Have a good one,
Vlad