> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Activate and Configure Attributes for Flexible Identifiers

> Describes how identifiers like email and phone must be configured for a database connection.

> [!WARNING]
>
> Enabling Flexible Identifiers on your tenant has the potential to introduce breaking changes to your production environment. For more information on potential problems and limitations, read [Flexible Identifiers and Attributes](/docs/docs/authenticate/database-connections/flexible-identifiers-and-attributes).

An Attribute for database connections, email, phone number, or username, is part of the Flexible Identifiers. End users sign up, authenticate, and reset passwords with an Attribute. Each Attribute has a unique configuration.

## Activate Attributes

> [tab] New connection
>
> 1. Navigate to [**Auth0 Dashboard > Authentication > Database**](https://manage.auth0.com/#/connections/database).
> 2. Select **+Create DB Connection**.
> 3. Enter a name for the connection and choose the attributes.
> 4. Choose the authentication method for the connection.

> [tab] Existing connection
>
> 1. Navigate to [**Auth0 Dashboard > Authentication > Database**](https://manage.auth0.com/#/connections/database).
> 2. Select the Database Connection you want to update from the list.
> 3. Select the **Attributes** tab and choose **Activate**.
> 4. When prompted to confirm you’ve tested your configuration in a Development environment, select **Proceed**.
> 5. On the Attributes screen, select **Add Attribute**, or **Configure** an existing attribute.

Default values are assigned to a new connection and can be edited after the connection has been created.

| Setting | Value |
| - | - |
| Use `\{attribute}` as Identifier | `True` |
| Allow Signup with `\{attribute}` | Required |
| Require `\{attribute}` on user profile | `True` |
| Username Length | Min: 1 Max: 15 |
| Allow usernames in email format | `False` |
| Allow usernames in phone number format | `False` |

## Configure Attributes

Select the **Attributes** tab on the connection. Choose from the available Attributes and select **Configure**. Once you've updated Attribute configurations, select **Save**.

> [accordion] Email Attribute Configuration Options
>
> | Option | |
> | - | - |
> | Use Email as Identifier | Turning this on will make email an identifier for this connection. Users will be able to use email for login and password reset. |
> | Verification Method | Choose Email Verification link or One-Time Password (OTP). |
> | Allow Signup with Email | Choose how email will be collected at signup <ul><li>**Off**: Attribute will be blocked from signup flows.</li><li>**Optional**: Attribute will be optional on signup flows.</li><li>**Required**: Signup flows will fail if the attribute is not present.</li></ul> Signup flows include: <ul><li>Universal Login</li><li>Authentication API `dbconnections/signup` endpoint</li></ul> |
> | Verify email on sign up | Users will be asked to verify their email address via magic link when signing up. |
> | Require email on user profile | Requires email to be present across all operations that create or update a user profile on this connection. Will require email is present on the following: <ul><li>Signup flows</li><li>Creating or updating a user via the Management API</li> <li>Bulk user import</li></ul> |

> [accordion] Username Attributes and Configuration Options
>
> | Option | |
> | - | - |
> | Use Username as Identifier | Turning this on will make username an identifier for this connection. Users will be able to use username for login and password reset. |
> | Allow Signup with Username | Choose how the username will be collected at signup <ul><li>**Off**: Attribute will be blocked from signup flows.</li><li>**Optional**: Attribute will be optional on signup flows.</li><li>**Required**: Signup flows will fail if Attribute is not present.</li></ul> Signup flows include: <ul><li>Universal Login</li><li>Authentication API `dbconnections/signup` endpoint</li></ul> |
> | Require username on user profile | Requires username to be present across all operations that create or update a user profile on this connection. Will require username is present on the following: <ul><li>Signup flows</li><li>Creating or updating a user via the Management API</li> <li>Bulk user import</li></ul> |
> | Username Length | Set the minimum and maximum values allowed for a user to have as username. |

> [accordion] Phone Number Attributes and Configuration Options
>
> | Option | |
> | - | - |
> | Use Phone Number as Identifier | Turning this on will make `phone_number` an identifier for this connection. Users will be able to use `phone_number` for login and password reset. |
> | Allow Signup with Phone Number | Choose how the phone number will be collected at signup <ul><li>**Off**: Attribute will be blocked from signup flows.</li><li>**Optional**: Attribute will be optional on signup flows.</li><li>**Required**: Signup flows will fail if attribute is not present.</li></ul> Signup flows include: <ul><li>Universal Login</li><li>Authentication API `dbconnections/signup` endpoint</li></ul> |
> | Verify phone on signup | Users will be required to verify their phone number via OTP when signing up. Please ensure you have configured a phone provider or your users will not be able to proceed with signing up. |
> | Require phone on user profile | Requires phone to be present across all operations that create or update a user profile on this connection. Will require phone is present on the following:<ul><li>Signup flows</li><li>Creating or updating a user via the Management API</li> <li>Bulk user import</li></ul> |
>
> You can configure a list of phone country codes, using a PATCH call to the [/api/v2/tenants/](/docs/docs/api/management/v2/tenants/patch-settings#body-country-codes-one-of-0) endpoint.

### Configure or remove existing Attributes on a connection

All Attributes can be changed or deleted from your Auth0 Dashboard (Auth0 Dashboard: Auth0's main product to configure your services.). Users cannot log in, sign up or reset passwords using the removed Attribute, and a minimum of one Attribute must remain active on every connection.

To change or remove an Attribute, navigate to the **Attributes** tab, then choose **Remove**.

### Revert a connection

To revert a connection back to its original state, use the Management API (Management API: A product to allow customers to perform administrative tasks.) to pull all existing values in the `options` object. Then update the connection with existing values.

First, pull existing `options` values by calling the [Get a connection](/docs/docs/api/management/v2/connections/get-connections-by-id) endpoint. Then add the values in a call to the [Update a connection](/docs/docs/api/management/v2/connections/patch-connections-by-id) endpoint with an `options` object that does not include the `attributes` parameter, as shown below.

* If you use the `options` parameter, the entire `options` object is overridden. To avoid partial data or other issues, ensure all current parameters are present by copying the contents within the connections `options` object and including it in the PATCH call. The only parameter you should remove is `attributes`.
* If your tenant has `username` enabled as an Attribute, performing the following action requires you to modify your `username` settings. You'll need to reconfigure your username settings if you choose this path.

```json lines theme={null}
{
"options": {
  //copy existing parameters for the `options` object here, except for the `attributes` parameter
       }
}
```
