Skip to content

Member Directory

A Member Directory is a Customer’s own list of people and groups, pushed into its Tenant so access follows employment.

Properties

PropertyTypeRequiredDescription
statestringrequiredWhere it stands; only active fills Roles.
groupRolesjsonWhich directory group fills which Role in the Tenant.
lastChangeAtdatetimeWhen the Customer’s directory last pushed a change.

Object

JSON
{
  "$id": "https://api.sb/kilnbakery.com/member-directories/member_directory_1",
  "$type": "MemberDirectory",
  "state": "draft",
  "groupRoles": {},
  "lastChangeAt": "2026-10-22T12:00:00Z"
}

Relationships

Lifecycle

Member Directory lifecycle: draft, active, failing, inactivedraft → active: MemberDirectory.provisionactive → failing: on MemberDirectory.failedactive → inactive: MemberDirectory.deactivatefailing → active: MemberDirectory.provisionfailing → inactive: MemberDirectory.deactivateinactive → active: MemberDirectory.provisiondraftactivefailinginactive
StateMeaningMoves to
draft (first)Waiting for the Customer’s directory to connect.active by MemberDirectory.provision
activeThe Customer’s directory pushes every hire, change and departure, and its groups fill Roles.failing on MemberDirectory.failed; inactive by MemberDirectory.deactivate
failingPushes stopped arriving or are refused, so access no longer follows the directory.active by MemberDirectory.provision; inactive by MemberDirectory.deactivate
inactiveTurned off: everyone it added keeps their Roles until an admin removes them.active by MemberDirectory.provision

Verbs

  1. createCreates a Member Directory.
    POST /{namespace}/member-directoriesdoMemberDirectory.created
  2. getReturns one Member Directory by id.
    GET /{namespace}/member-directories/{id}readNo Event
  3. listReturns Member Directories, newest first, one page at a time.
    GET /{namespace}/member-directoriesreadNo Event
  4. updateChanges the given properties of a Member Directory.
    PATCH /{namespace}/member-directories/{id}doMemberDirectory.updated
  5. deactivateDeactivate stops a Member Directory’s pushes; everyone it added keeps their Roles until an admin removes them.
    POST /{namespace}/member-directories/{directory}/deactivatedoMemberDirectory.deactivated
  6. deprovisionDeprovision ends one person’s access to a Tenant in one Action when the Customer’s directory removes them.
    POST /{namespace}/member-directories/{directory}/deprovisiondoMemberDirectory.deprovisioned
  7. provisionProvision starts a Customer’s Member Directory pushing people and groups into its Tenant, with groups mapped to Roles.
    POST /{namespace}/member-directories/provisiondoMemberDirectory.provisioned

Events

Events no Verb emits. Each Verb’s Event is in the Verbs table above; every Event is delivered in the same shape.

MemberDirectory.failed

A Customer’s directory stopped pushing, or its pushes are refused, so access no longer follows it. Raised by the rail.

FieldTypeRequiredDescription
namestringrequiredMemberDirectory.failed.
atdatetimerequiredWhen it happened.
seqintegerIts position in the namespace, one more than the Event before; any seq is a cursor into the history.
datajsonrequiredThe Thing as the Action left it.
data.memberDirectoryMember DirectoryrequiredThe Member Directory as the change left it.
data.memberDirectory.statestringrequiredWhere it stands; only active fills Roles.
data.memberDirectory.groupRolesjsonWhich directory group fills which Role in the Tenant.
data.memberDirectory.lastChangeAtdatetimeWhen the Customer’s directory last pushed a change.
data.causestringrequiredWhat failed: tokenRevoked, noPushIn24h, or pushRefused.
data.previous.statestringrequiredThe state before this Event: active.
JSON
{
  "$id": "https://api.sb/kilnbakery.com/events/event_1",
  "$type": "Event",
  "name": "MemberDirectory.failed",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "memberDirectory": {
      "$id": "https://api.sb/kilnbakery.com/member-directories/member_directory_1",
      "$type": "MemberDirectory",
      "state": "failing",
      "groupRoles": {},
      "lastChangeAt": "2026-10-22T12:00:00Z"
    },
    "cause": "tokenRevoked",
    "previous": {
      "state": "active"
    }
  },
  "seq": 1
}

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
MemberDirectory.createYesYesNoNo
MemberDirectory.getYesYesYesYes
MemberDirectory.listYesYesYesYes
MemberDirectory.updateYesYesNoNo
MemberDirectory.deactivateYesYesNoNo
MemberDirectory.deprovisionYesYesNoNo
MemberDirectory.provisionYesYesNoNo

Call it

Text
Provision the latest member directory with a tenant.

Example

A 400-person Customer pushes its staff directory into its Tenant. The finance group fills the Role that approves Bills, and a person who leaves loses access the same hour.