HOWTO: Add New Fields to the User Profile or Group Profile

Updated: May 10, 2020

This page is scheduled for review and update. Check back soon for updated content!

Users and groups are defined using schemas and as an Extensible Platform, Nuxeo gives you the ability to modify or add schemas.

The default user schema definition:

<?xml version="1.0"?>

<xs:schema targetNamespace=""

  <xs:include schemaLocation="base.xsd" />

  <xs:element name="username" type="xs:string" />
  <xs:element name="password" type="xs:string" />
  <xs:element name="firstName" type="xs:string" />
  <xs:element name="lastName" type="xs:string" />
  <xs:element name="company" type="xs:string" />
  <xs:element name="email">
      <xs:restriction base="xs:string">
        <!-- the same pattern is used in userinfo.xsd -->
        <xs:pattern value="[^@][email protected][^\.]+\..+" />

  <!-- inverse reference -->
  <xs:element name="groups" type="nxs:stringList" />

  <!-- tenant id for the user -->
  <xs:element name="tenantId" type="xs:string" />


If you want to contribute to the default user profile, you can override the user definition:

<extension point="schema" target="org.nuxeo.ecm.core.schema.TypeService">
  <!-- override default user schema -->
  <schema name="user" override="true" src="schemas/my_custom_user_schema.xsd"/>

In the Nuxeo Platform user infos are displayed as follow:

How to add new fields to the user profile or group profile
How to add new fields to the user profile or group profile

Whenever you contribute to a schema referencing another schema or document, you must define the references and inverse references. On that particular case you also have to define directories to specify the way schemas are linked to each others. The relation between user and groups uses a directory called groupDirectory defined as follow:

<?xml version="1.0"?>
<component name="">
  <extension target="" point="directories">

    <directory name="groupDirectory" extends="template-group">



        <reference field="members" directory="userDirectory"
                   name="user2group" source="groupId" target="userId"

        <reference field="subGroups" directory="groupDirectory"
                   name="group2group" source="parentGroupId"
        <inverseReference field="parentGroups" directory="groupDirectory"


The customisation of the groups is similar to the users.

The default group schema definition:

<?xml version="1.0"?>

<xs:schema targetNamespace=""

  <xs:include schemaLocation="base.xsd" />

  <xs:element name="groupname" type="xs:string" />
  <xs:element name="grouplabel" type="xs:string" />
  <xs:element name="description" type="xs:string" />

  <!-- references -->
  <xs:element name="members" type="nxs:stringList" />
  <xs:element name="subGroups" type="nxs:stringList" />

  <!-- inverse reference -->
  <xs:element name="parentGroups" type="nxs:stringList" />

  <!-- multi tenant -->
  <xs:element name="tenantId" type="xs:string" />


The group schema can be extended as well using an extension.

<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
  <schema name="group" src="schemas/my_custom_group_schema.xsd"/>

Make sure you have the mandatory fields configured for references and inverse references for the group hierarchy.

In a more friendly way, you can add your own schemas using Nuxeo Studio.

We'd love to hear your thoughts!

All fields required