Person Archetype

Last modified 21 Nov 2025 09:13 +01:00
Since 4.8
This functionality is available since version 4.8.

This document describes the built-in Person archetype in midPoint.

Introduction

The built-in Person archetype can be used for users imported from an authoritative source of data, such as HR. We have created this archetype as a part of First Steps Methodology.

This archetype includes a reference to Person Object Template, which is also a midPoint initial object.

System configuration includes an object collection view for users with this archetype.

Example of using the Person archetype
Figure 1. Example of using the Person archetype

Configuration

Person archetype

The Person archetype references the Person Object Template, and it can be assigned to users.

Person object template

The template contains two mappings:

  • generate-name-jsmith-8-2: Mapping to generate the midPoint username from user’s givenName and familyName properties using the jsmith naming convention. At most 8 characters are used. To achieve username uniqueness, an iteration token is appended (2-99).

    • This mapping’s strength is weak; it will only be used to create usernames. Usernames will never be automatically changed if user’s givenName or familyName changes, however, it can be overridden manually by an administrator.

    • This mapping has the lifecycle state set to draft by default, i.e., it is effectively disabled by default. Change the lifecycle state to proposed to use the mapping in simulations, or to active to use the mapping.

  • generate-fullname: Mapping to generate the midPoint fullName property from user’s givenName and familyName using the John Smith naming convention.

    • this mapping’s strength is strong; it will always enforce the fullName.

Feel free to add any additional mappings or change the existing ones; just remember that the object template is a midPoint built-in object that may be updated in future midPoint releases.

System configuration example

In the following configuration example, you can see how we:

  • display users with the Person archetype assigned using a menu item,

  • add a custom search configuration.

Default Person-related configuration in the system configuration (objectCollectionView)
<objectCollectionView id="80">
    <description>Persons</description>
    <documentation>This view displays all users with archetype "Person"</documentation>
    <identifier>person-view</identifier>
    <displayOrder>10</displayOrder>
    <type>UserType</type>
    <collection>
        <collectionRef oid="00000000-0000-0000-0000-000000000702" relation="org:default" type="c:ArchetypeType">
            <!-- Person -->
        </collectionRef>
    </collection>
    <searchBoxConfiguration>
        <searchItems>
            <searchItem id="81">
                <description>Allow searching for users having account on specific resource. Intent is not considered. The search item is not displayed by default
                    (visibleByDefault=false).
                </description>
                <visibleByDefault>true</visibleByDefault>
                <filter>
                    <q:text>
                        linkRef/@ matches (
                        . type ShadowType
                        and resourceRef/@/name = `resourceParameter?.getName()?.getOrig()`
                        and kind = "account" )
                    </q:text>
                </filter>
                <display>
                    <label>Users with account</label>
                </display>
                <parameter>
                    <name>resourceParameter</name>
                    <type>c:ObjectReferenceType</type>
                    <targetType>ResourceType</targetType>
                </parameter>
            </searchItem>
            <searchItem id="82">
                <description>Allow searching for users not having account on specific resource. Intent is not considered. The search item is not displayed by default
                    (visibleByDefault=false).
                </description>
                <visibleByDefault>true</visibleByDefault>
                <filter>
                    <q:text>
                        linkRef/@ not matches (
                        . type ShadowType
                        and resourceRef/@/name = `resourceParameter?.getName()?.getOrig()`
                        and kind = "account" )
                    </q:text>
                </filter>
                <display>
                    <label>Users without account</label>
                </display>
                <parameter>
                    <name>resourceParameter</name>
                    <type>c:ObjectReferenceType</type>
                    <targetType>ResourceType</targetType>
                </parameter>
            </searchItem>
        </searchItems>
    </searchBoxConfiguration>
</objectCollectionView>
Was this page helpful?
YES NO
Thanks for your feedback