Custom Principal

Template for modeling a lightweight identity source with users, groups, and tenants

Use this template to model a source of identities (users, groups, and tenants) using the Open Authorization API. Principals represent identity sources that connect to other OAA template types on the same provider, enabling Veza to map users and groups to the applications and resources they access.

The Custom Principal template differs from the Custom Identity Provider in scope: a Principal is a lightweight identity source meant to feed users and groups into Custom Application or other templates on the same provider. Custom IdP models a full identity provider with domains and federated identity features.

The template has three primary entities:

  • Tenant - the top-level container for the principal instance. Each submission has exactly one tenant.

  • Users - the individual identities in the principal system. Users can belong to groups and have custom properties like is_active, email, and timestamps.

  • Groups - collections of users. Groups support hierarchical nesting through parent group references.

A custom property definition can define additional properties for tenants, users, and groups.

spinner

To use the principal template, set custom_templates to a list that includes principal when creating the provider. Because a principal is almost always used alongside an application, include both templates:

curl -X POST "https://{VEZA_URL}/api/v1/providers/custom" \
-H "authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
--data '{"name":"ExampleCorp","custom_templates":["principal","application"]}'

Then create a data source for the principal on that provider, specifying the principal template:

curl -X POST "https://{VEZA_URL}/api/v1/providers/custom/{PROVIDER_ID}/datasources" \
-H "authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
--data '{"name":"Principal Data Source","custom_template":"principal"}'

Sample Payloads

chevron-rightCustom Principal with Users and Groupshashtag

This example demonstrates a corporate directory with users assigned to groups, custom properties, and hierarchical group nesting.

Real-World Example: Atlassian Cloud Admin

Veza's Atlassian Cloud connector uses the Custom Principal template to model the organization-level identity directory in Atlassian Cloud. The principal feeds users and groups into the Jira Cloud and Confluence Cloud application connectors on the same provider, linking identities to the resources they access.

This approach separates identity management (who exists, what products they can access) from application-level authorization (what permissions they have in Jira projects or Confluence spaces). The principal captures the organization directory, while separate Custom Application submissions model Jira and Confluence.

chevron-rightAtlassian Cloud Admin Payloadhashtag

This payload models an Atlassian Cloud organization with managed and external users, product-access groups, and custom properties tracking account metadata.

Key patterns from this integration:

  • user_type distinguishes managed users (in the organization's domain) from external collaborators, enabling access reviews to flag external access.

  • product_access as a STRING_LIST tracks which Atlassian products each user can access (Jira, Confluence, Bitbucket), providing visibility into license usage.

  • access_billable flags whether the user counts toward the organization's Atlassian license seat count.

  • Groups map to product access rather than organizational structure — groups like jira-software-users and confluence-users reflect Atlassian's product-based access model.

  • The principal connects to application templates on the same provider. Users and groups defined here appear as identities in Jira Cloud and Confluence Cloud Custom Application submissions, linking organization membership to application-level permissions.

Top-Level Payload

Field
Type
Description

name

string

Name of the principal provider instance

principal_type

string

Type descriptor for the principal provider (e.g., corporate_directory). Applied as a searchable property

custom_property_definition

object

Defines custom properties for tenants, users, and groups. See Custom Properties

tenant

object

The tenant object for this principal

users

array

Array of user objects

groups

array

Array of group objects

incremental_change

boolean

When true, enables incremental updates (optional)

Tenant

Each principal submission contains exactly one tenant, representing the top-level container for the identity source.

Tenant Properties

Field
Type
Description

name

string

Display name for the tenant

id

string

Unique identifier for the tenant

tenant_unique_id

string

Optional unique identifier, typically a URL or external ID. Defaults to id if not provided

tags

array

Specify tags with a key and optional value

custom_properties

dictionary

Custom Properties validated against the custom_property_definition

operation

enum

For incremental updates, the operation to apply (optional)

Users

Users represent individual identities in the principal system. Each user can be linked to external identities and assigned to groups.

User Properties

Field
Type
Description

name

string

Display name for the user

id

string

Unique identifier for the user. Defaults to name if not provided

email

string

Email address for the user (optional)

user_unique_id

string

Optional unique identifier. Defaults to email if set, otherwise id

display_name

string

Display name shown in Veza (optional)

is_active

boolean

Whether the user account is active

created_date

string

Date the user was created, in RFC 3339 format (e.g., 2024-01-15T09:00:00.000Z)

deactivated_date

string

Date the user was deactivated, in RFC 3339 format (optional)

last_login

string

Date of the user's last login, in RFC 3339 format (optional)

identities

array

List of identity strings (e.g., email addresses) used for linking to external identity providers

groups

array

List of group references as {"id": "group_id"} objects

tags

array

Specify tags with a key and optional value

custom_properties

dictionary

Custom Properties validated against the custom_property_definition

operation

enum

For incremental updates, the operation to apply (optional)

Groups

Groups represent collections of users. Groups can have external identities and support hierarchical nesting through parent group references.

Group Properties

Field
Type
Description

name

string

Display name for the group

id

string

Unique identifier for the group. Defaults to name if not provided

group_unique_id

string

Optional unique identifier for the group. Defaults to id if not provided

group_type

string

Type descriptor for the group (e.g., Security, Department, Team)

parent_group

object

Reference to a parent group as {"id": "parent_group_id"} for hierarchical nesting (optional)

identities

array

List of identity strings for linking to external identity providers

tags

array

Specify tags with a key and optional value

custom_properties

dictionary

Custom Properties validated against the custom_property_definition

operation

enum

For incremental updates, the operation to apply (optional)

Custom Property Definitions

Custom properties allow you to attach additional metadata to principal entities. Define properties in the custom_property_definition object, then set values on individual entities.

Scope
Description

tenant_properties

Custom properties for the tenant entity

user_properties

Custom properties for user entities

group_properties

Custom properties for group entities

Property values must match their declared type. Supported types are described in Custom Properties.

Incremental Updates

After the initial metadata push (which must contain the full payload), you can modify, add, or remove the tenant, users, and groups without resubmitting other entities. An incremental update is enabled by setting "incremental_change": true in the push payload, and specifying the update operation for each entity to change.

Creating and Updating a Custom Principal

To create the OAA provider and push data:

  1. Create the provider with both the principal and application template types:

  2. Create a data source on the provider, specifying the principal template:

  3. Push the payload to the data source:

    The push endpoint requires the payload as a JSON-encoded string in the json_data field. jq -Rs . reads payload.json and escapes it as a JSON string.

Updates follow the same push workflow. Veza processes the full payload and updates the Authorization Graph accordingly.

Last updated

Was this helpful?