> For the complete documentation index, see [llms.txt](https://ztrust.gitbook.io/ztrust-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ztrust.gitbook.io/ztrust-documentation/user-manual-ztrust-v4.1/4.-admin-manual/4.11-user-profile-custom-attributes.md).

# 4.11 User Profile – Custom Attributes

ZTrust allows administrators to extend the default user profile by adding **custom attributes** such as *Employee ID*, *Department*, or *Phone Number*.

With the **User Profile feature** you can:

* Define attributes at the **realm level** with validation rules.
* Control whether fields are **mandatory, optional, or read-only**.
* Decide where attributes appear: **Admin Console, Self Service Portal, Registration form**.
* Ensure **data consistency and validation** across all users.

## Steps to Create Custom Attributes

1. Login to the **ZTrust Admin Console**.

   <figure><img src="/files/Lp1uQUYfAqgxRe1OLtOK" alt=""><figcaption><p>Fig 4.10.a: Master realm</p></figcaption></figure>
2. Click on **Manage Realms** in the sidebar to view the list of realms available in your **ZTrust**.

   <figure><img src="/files/yem9Zeqx4DU6MlvpDqYE" alt=""><figcaption><p>Fig 4.10.b: Choose realm</p></figcaption></figure>
3. From the list of **realms**, **select** the realm where you want to create custom attributes.

   <figure><img src="/files/kKo6KqyOnRPJZVh8aBTl" alt=""><figcaption><p>Fig 4.11.c: Welcome to demo realm</p></figcaption></figure>
4. In the left sidebar, under the **Configure** section, choose **Realm Settings**.

   <figure><img src="/files/Idr1JfzMDFzF1OwAZeC5" alt=""><figcaption><p>Fig 4.10.d: Realm settings in side bar</p></figcaption></figure>
5. In the R**ealm Settings** section, click on the **User Profile** tab. This will display the list of available attributes.

   <figure><img src="/files/6lehii6xKPI8zu5I49Ot" alt=""><figcaption><p>Fig 4.10.e: Select user profile tab</p></figcaption></figure>
6. To create a new custom attribute, click on the ***Create Attribute*** button. This will open a new page.

   <figure><img src="/files/lHrzXlDlppqBVszCXLQg" alt=""><figcaption><p>Fig 4.10.f: Create attribute</p></figcaption></figure>
7. Configure the attribute:

   | Field            | Description                                                                                                                                                                                                            |
   | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Name             | Internal key (e.g., `employeeId`)                                                                                                                                                                                      |
   | **Display Name** | User-friendly label (e.g., *Employee ID*)                                                                                                                                                                              |
   | Required         | Mark as mandatory if needed                                                                                                                                                                                            |
   | Permissions      | <p>Choose who can view/edit : </p><ul><li><strong>Admin</strong> only</li><li><strong>User</strong> (self-service)</li><li><strong>Both</strong></li></ul>                                                             |
   | Validations      | <p>Add constraints:</p><ul><li><em>Regex</em> → e.g., <code>^\[0-9]+$</code> for numeric IDs</li><li><em>Length</em> → min/max characters</li><li><em>Options</em> → dropdown values (e.g., IT, HR, Finance)</li></ul> |
8. After filling in all the mandatory fields, click the *Create* button.

## Conclusion

User Profile attributes provide a structured way to manage custom fields. They can be customized with validations, permissions, and UI hints, and they automatically appear in the Admin Console, Self Service Portal, and Registration pages.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ztrust.gitbook.io/ztrust-documentation/user-manual-ztrust-v4.1/4.-admin-manual/4.11-user-profile-custom-attributes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
