Kinde · Arazzo Workflow

Kinde Invite User to Organization

Version 1.0.0

Validate roles, create an organization invitation, and poll until it is sent.

1 workflow 1 source API 1 provider
View Spec View on GitHub AuthenticationAuthorizationCustomer IdentityIdentity ManagementOAuthOpenID ConnectSingle Sign-OnMulti-Factor AuthenticationRole-Based Access ControlFeature FlagsBillingB2BSaaSDeveloper PlatformArazzoWorkflows

Provider

kinde

Workflows

invite-user-to-organization
Create an organization invitation and poll until it is sent.
Lists available roles, creates an organization invite with the supplied role keys, and polls the invitation until its send flag is set.
3 steps inputs: email, firstName, lastName, orgCode, roleKeys outputs: inviteCode, inviteLink
1
listRoles
GetRoles
List the tenant's roles so the caller can confirm the requested role keys exist before issuing the invitation.
2
createInvite
createOrganizationInvite
Create the organization invitation with the supplied roles and send the invitation email. Returns the invitation code used for polling.
3
pollInviteSent
getOrganizationInvite
Poll the invitation by its code until the is_sent flag indicates the invitation email has been dispatched.

Source API Descriptions

Arazzo Workflow Specification

kinde-invite-user-to-organization-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Kinde Invite User to Organization
  summary: Validate roles, create an organization invitation, and poll until it is sent.
  description: >-
    Invites a new user into an organization with a set of roles. The workflow
    first lists the tenant's roles so the caller can confirm the requested role
    keys exist, creates the organization invitation (optionally sending the
    invitation email), and then polls the invitation by its code until the email
    send flag flips to sent. Every step inlines its request so the flow can be
    read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: kindeManagementApi
  url: ../openapi/kinde-management-api-openapi.yml
  type: openapi
workflows:
- workflowId: invite-user-to-organization
  summary: Create an organization invitation and poll until it is sent.
  description: >-
    Lists available roles, creates an organization invite with the supplied role
    keys, and polls the invitation until its send flag is set.
  inputs:
    type: object
    required:
    - orgCode
    - email
    - roleKeys
    properties:
      orgCode:
        type: string
        description: The organization code to invite the user into.
      email:
        type: string
        description: The email address of the user to invite.
      firstName:
        type: string
        description: Optional first name of the invitee.
      lastName:
        type: string
        description: Optional last name of the invitee.
      roleKeys:
        type: array
        description: Role keys to assign to the invited user.
        items:
          type: string
  steps:
  - stepId: listRoles
    description: >-
      List the tenant's roles so the caller can confirm the requested role keys
      exist before issuing the invitation.
    operationId: GetRoles
    parameters:
    - name: sort
      in: query
      value: name_asc
    - name: page_size
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      roles: $response.body#/roles
  - stepId: createInvite
    description: >-
      Create the organization invitation with the supplied roles and send the
      invitation email. Returns the invitation code used for polling.
    operationId: createOrganizationInvite
    parameters:
    - name: org_code
      in: path
      value: $inputs.orgCode
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
        first_name: $inputs.firstName
        last_name: $inputs.lastName
        roles: $inputs.roleKeys
        send_email: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      inviteCode: $response.body#/invite/code
  - stepId: pollInviteSent
    description: >-
      Poll the invitation by its code until the is_sent flag indicates the
      invitation email has been dispatched.
    operationId: getOrganizationInvite
    parameters:
    - name: org_code
      in: path
      value: $inputs.orgCode
    - name: invite_code
      in: path
      value: $steps.createInvite.outputs.inviteCode
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.is_sent == true
      type: jsonpath
    outputs:
      inviteLink: $response.body#/invite_link
      isSent: $response.body#/is_sent
    onSuccess:
    - name: invitationSent
      type: end
    onFailure:
    - name: retryInvitePoll
      type: retry
      retryAfter: 3
      retryLimit: 10
      criteria:
      - condition: $statusCode == 200
  outputs:
    inviteCode: $steps.createInvite.outputs.inviteCode
    inviteLink: $steps.pollInviteSent.outputs.inviteLink