Concepts rapidvalue.eu →

Provisioning Mappings and Lookups

Write-mappings, sync_mode, operators, provisioning lookups, and cross-system references.

Anatomy of a write-mapping

Each ConnectorInstance.provisioning_field_mappings entry is a JSONB dictionary with these fields:

Operators — ways to compute a value

  1. passthrough — a direct copy: source_field: "identity.email" → the target receives the identity's email. The fastest path for 80% of mappings.

  2. expression — a Jinja template: {"\"{{ identity.first_name }}.{{ identity.last_name }}@example.com\""}. Can filter or transform: {"| lower"}, {"| if_null('default')"}.

  3. constant — a fixed value for every account: constant: "Member".

  4. lookup — query another system for the value. lookup_schema_id points to a provisioning lookup row that describes the filter and return field. See the section below.

  5. account_attr — a cross-system reference: account_attr("ad-corp", "samaccountname") reads the AD account's samAccountName for the same identity. This drives the depends_on_systems dependency graph (AD must sync before Entra).

  6. builtin — helpers: gen_username (3 styles + accent normalization), slug, gen_uuid.

sync_mode — what the platform does when the target diverges

Provisioning lookups — cross-system reference resolution

Lookups let a mapping query the target API itself to resolve references. Example: a manager_id mapping on Entra:

Good to know

Lookups are the number-one cause of slow provisioning on large tenants. Be careful with per_job scope on large batches; a per_sync scope with a higher time-to-live (TTL) often works better.

Per-account-type targeting

applies_to_account_types filters per type. Use case: personal accounts get userPrincipalName from identity.email, while admin-privileged accounts get a-{"{first.last}"}@domain. Both mappings write to the same target_field but for different types.

Specificity: a mapping that names a type explicitly wins over a generic (empty applies_to_account_types) mapping on the same target_field.


Further reading: