# Schema Reference

The application schema is used to configure the objects returned from a connector.

> [!NOTE]
>
> - The **Account Schema** tab is used to define the attributes for each object type in the application being configured. The schema attributes can be defined as **Entitlement** or **Multi-Valued**. Refer to [Managing Source Account Schemas](<https://documentation.sailpoint.com/saas/help/accounts/schema.html>) for more information.
> - The schema attributes that are not present by [default](<#default-account-schema>) must be defined as strings if not specified.

The Promptfoo connector uses the following default correlation and object configurations.

## Default Correlation Configuration

Before you aggregate accounts from this source, you can map account attributes with their corresponding identity attributes based on your requirements.

You can customize the correlation configuration. Refer to [Assigning Source Accounts to Identities](<https://documentation.sailpoint.com/saas/help/accounts/correlation.html>) for more information.

When you first create the Promptfoo source, the default correlation mapping is:

| Identity Attribute | Account Attribute |
| --- | --- |
| email | email |

## Default Account Schema

Each source supports a variety of details, or attributes, about each user who has an account, such as their name, email address, manager name, and location.

The set of account attributes each source stores and how they're organized is known as the account's *schema*. To best represent your data, you can configure sources to use an account schema matching the one you use in the external connector. Refer to [Managing Source Account Schemas](<https://documentation.sailpoint.com/saas/help/accounts/schema.html>) for more information.

### Default Account Attributes

The Promptfoo connector supports the following default account schema attributes and customer configurable attributes. The attributes must be defined as strings if not specified.

| Attribute | Type | Description |
| --- | --- | --- |
| id | String | Unique identifier of the user. Account ID. |
| email | String | Email address of the user. Account name. |
| name | String | Name of the user. |
| isAdmin | Boolean | Whether the user is an organization admin. This is independent of team roles. |
| role | Entitlement | Role the user holds in each team. A user can have more than one role, one per team. |
| team | Entitlement | Teams the user belongs to. |
| createdAt | Date | Date and time the user was created. |
| updatedAt | Date | Date and time the user was last updated. |
| lastActivityAt | Date | Date and time of the user's last activity. |

Role values follow your organization's role management setting in Promptfoo. If roles are managed by your identity provider, team roles are updated at each user's next sign-in.

### Default Account ID

SailPoint requires that certain attributes remain in your configuration. These attributes are referred to as *account IDs*.

> [!CAUTION]
>
> Changing the attribute marked as the account ID after aggregating accounts can result in duplicate accounts being created. To avoid this, either reset the accounts on this source before editing the account ID attribute or edit the account ID attribute before aggregating accounts.
>
> To resolve issues caused by changing account IDs, reconfigure them to their default values.

The following table lists the default account IDs for this connector:

`id`

The account name is the user's email address.

### Default Entitlement Attributes

Entitlement attributes define the entitlements, such as groups or roles, that can be assigned to the managed system's user accounts. Refer to [Managing Entitlements](<https://documentation.sailpoint.com/saas/help/access/entitlements.html>) for more information.

> [!CAUTION]
>
> Changing the attribute marked as the Entitlement ID after aggregating accounts or entitlements can result in duplicate entitlements being created, or access profiles and roles breaking. To avoid this, edit the entitlement schema before performing any aggregations.

#### Team Attributes

Run entitlement aggregation to load teams. Each team is identified by its ID and displayed by its name.

| Attribute | Type | Description |
| --- | --- | --- |
| id | String | Unique identifier of the team. Entitlement ID. |
| name | String | Name of the team. Entitlement name. |
| slug | String | URL-friendly identifier of the team. |
| organizationId | String | Organization the team belongs to. |

#### Role Attributes

Run entitlement aggregation to load roles. Each role is identified by its ID and displayed by its name.

| Attribute | Type | Description |
| --- | --- | --- |
| id | String | Unique identifier of the role. Entitlement ID. |
| name | String | Name of the role. Entitlement name. |
| slug | String | URL-friendly identifier of the role. |
