Overview
This article explains an error that occurs when attempting to create a user via the Management API. For example, the POST request in the example below to create a user that includes the phone_number
attribute in the request body results in the following error:
phone_number is not allowed…
{
"email": "email_of_new_user",
"connection": "connection_name",
"password": "password_for_new_user"
}
Applies To
- Management API
- Attributes for Flexible Identifiers
Cause
The phone_number
attribute is an identifier that must be explicitly enabled on the database connection before it can be used during user creation. This configuration is not enabled by default.
Solution
To resolve the issue, enable the phone_number
attribute as an identifier within the database connection’s settings.
- Navigate to Authentication > Database.
- Select the relevant database connection.
- Select the Attributes tab.
- Enable the new attributes configuration.
- Add
phone_number
as an identifier.
NOTE: If a phone_number
for the user is not available, the phone_number
property must be omitted from the POST request.
For additional information, review the documentation on Attributes for Flexible Identifiers.