# Manage custom field metadata

Udf is the abbreviation of User Defined Field (User Defined Field). Authing data entities (such as users, roles, groups, organizations, etc.) can add custom fields. You can configure fields that Authing does not come with by default. For example, if you need to create a school-related application, you can add a custom field. `school` field. At the same time, you can ask the user to supplement the information of this field after the user registration is completed. For detailed documentation, please see https://docs.authing.co/extensibility/user/extend-register-fields.html.

# Set custom field metadata

UdfManagementClient().set(targetType, key, dataType, label)

Set custom field metadata, if the field does not exist, it will be created automatically.

# Parameters

  • targetType <UdfTargetType> Custom field target type, USER means user and ROLE means role.
  • key <string> field key
  • dataType <UdfDataType> data type, currently supports five data types. STRING is a character string, NUMBER is a number, DATETIME is a date, BOOLEAN is a boolean value, and OBJECT is an object.
  • label <string> The field Label is generally a Human Readable string.

# Example

var udf = await managementClient.Udf.Set(UdfTargetType.USER, "key", UdfDataType.STRING, "label");

# Delete custom fields

UdfManagementClient().remove(targetType, key)

Delete custom fields

# Parameters

  • targetType <UdfTargetType> Custom field target type, USER means user and ROLE means role.
  • key <string> field key

# Example

var udf = await managementClient.Udf.Remove(UdfTargetType.USER, "key");

# Get custom field definition

UdfManagementClient().list(targetType)

Query custom fields defined by user pool

# Parameters

  • targetType <UdfTargetType> Custom field target type, USER means user and ROLE means role.

# Example

var udfs = await managementClient.Udf.List(UdfTargetType.USER);