Skip to content

Invite User to Tenant

Implement OAM::IAM::0006::0004.UC from Identity and Access Management Behaviors.

  1. Any user of a tenant can send an invitation.
  2. The system does not send the email automatically; it provides a sample message with an invitation link that the user sends manually.
  3. Invitation inbox is not part of the system. Invitees are expected to manage their invitations in their email inbox.
  4. Batch operations (creation, management) of invitations is out-of-scope.
  1. Create an invitation to a user (identified by email) to join the tenant.
  2. View all invitations sorted by creation date (descending), filterable by status (PENDING, ACCEPTED, EXPIRED, REJECTED, CANCELLED, ARCHIVED) with pagination.
  3. Cancel an invitation in PENDING status.
  4. Reopen an invitation in CANCELLED or EXPIRED status, returning it to PENDING.
  5. Archive an invitation from any status, moving it to ARCHIVED.
  6. Refresh an invitation in PENDING status, updating its invitationDate to the current date and time and its expirationDate to the current date and time plus the configured expiration interval.
  1. Accept the invitation (joining the tenant).
  2. Reject the invitation.
  1. Provide the invitation as a link encoding the invitation identifier and (for convenience) the invitee’s email.
  2. Validate the invitation:
    • Exists
    • Is in PENDING status
    • Is addressed to the logged-in user

PlantUML diagram

All entities will include the following information:

Field NameTypeDescriptionNotes
idUUIDA unique identifier for the entity in the systemGenerated by the system. Not editable
rIdUUIDA unique identifier for a particular version of the entityNot editable
createdByTextThe identification of the user that created the entityNot Editable
createdAtTimeCoordinatesThe time when the entity was created, specifying when it was created in the real world and when it was recorded by the system.
authorTextThe identification of the users that made the latest change (version) of the entity.
asOfTimeCoordinatesThe time when the latest change was made (effective and recorded).

In addition, Invitations belong to a tenant, so they will also have:

Field NameTypeDescriptionNotes
tenantIdUUIDThe identification of the tenant that owns this entity.
FieldTypeDefaultEditableDescription
invitationDateDateCreated atNoDate invitation was created
expirationDateDateinvitationDate + configurable intervalNoExpiry date
statusEnumPENDINGNoCurrent lifecycle status
inviteeStringBlankYesEmail of invited user
inviterIdUUIDCurrent user idNoID of inviting user
tenantIdUUIDCurrent tenant idNoTenant being invited to

The state diagram annotates those states and transitions that are triggered by the invitee or the system events. All other transitions (e.g. cancel, archive) are triggered by a user in the inviting tenant.

These operations (refresh, cancel, …) are implemented as update of the status field on the invitation entity, as dewxcibed by the transiotion diagram below.

PlantUML diagram

  1. Inviter creates invitations via the Organization Page.
  2. System registers a PENDING invitation and returns an invitation URL.
  3. Inviter shares the URL (email, message, QR code).
  4. Invitee opens the URL, signs in or creates an account if needed.
  5. System validates the invitation.
  6. On accept:
    • invitation transitions to ACCEPTED.
    • a new AgentFor is created linking the invitee’s UserAccount to the tenant;
    • the invitee’s role in the tenant is set to USER;
    • invitee’s active tenant is set to the new tenant.
  7. On reject:
    • invitation transitions to REJECTED.

PlantUML diagram