Skip to main content

Define Identity Pool user attributes

Schemas define the structure of user data, including required fields and validation rules. Creating a schema at the tenant level allows you to standardize user attributes across multiple Identity Pools.

  1. Go to Tenant settings > Identity Pools > Schemas.

  2. Click Create Schema and save it with a unique name.

  3. Open the schema and go to the Schema tab.

    The schema is defined as a JSON object with these key properties:

    Object

    Description

    properties

    Defines the user data fields

    description

    Schema description (appears on the registration form)

    type

    Always set to "object"

    required

    Lists mandatory fields for user registration

  4. Modify the schema by adding properties and updating the required fields.

    For example, the following sample adds an e-mail field custom property.

    {
    "properties":{
        "family_name":{
            "description":"user last name",
            "type":"string",
            "minLength":1
        },
        "given_name":{
            "description":"user first name",
            "type":"string",
            "minLength":1
        },
        "name":{
            "description":"user full name",
            "type":"string",
            "minLength":1
        },
        "e-mail":{
            "description":"user e-mail",
            "type":"string",
            "minLength":1
        },
        "custom":{
            "description":"Custom",
            "type":"boolean",
            "minLength":1
        }
    },
    "description":"sample user data schema",
    "type":"object",
    "required":[
        "family_name",
        "given_name",
        "e-mail",
        "custom"
     ]
    }

    As a result, the required user payload for both administrators and users appears as follows:

    identity_pool_002.png
  5. Save your changes.

Attach user attributes to an Identity Pool

After creating a schema at the tenant level, attach it to an Identity Pool to define which user attributes are collected and stored.

Note

Schemas attached to Identity Pools are read-only. To modify a schema, update it at the tenant level. Changes apply across all associated Identity Pools

  1. Go to Tenant settings > Identity Pools > [Selected Identity Pool] > Schemas.

  2. Select the schema for that aligns with your organization's policies.

  3. Save your changes.