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.
Go to Tenant settings > Identity Pools > Schemas.
Click Create Schema and save it with a unique name.
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
Modify the schema by adding properties and updating the
required
fields.For example, the following sample adds an
e-mail
fieldcustom
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:
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
Go to Tenant settings > Identity Pools > [Selected Identity Pool] > Schemas.
Select the schema for that aligns with your organization's policies.
Save your changes.