arazzo: 1.0.1
info:
title: Auth0 Create Organization, Add Member and Assign Member Roles
summary: Create an organization, add a single user as a member, and assign that member organization-scoped roles.
description: >-
Provisions an Auth0 Organization member with scoped roles. The workflow
creates an organization, adds one existing user as a member, and assigns
the supplied roles to that user within the context of the organization. Each
step spells out its request inline so the flow can be read and executed
without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: organizationsApi
url: ../openapi/auth0-organizations-api-openapi.yml
type: openapi
workflows:
- workflowId: create-org-assign-member-roles
summary: Create an organization, add a member, and assign organization-scoped roles to that member.
description: >-
Creates an organization, adds the supplied user as a member, then assigns
the supplied role ids to that member within the organization.
inputs:
type: object
required:
- name
- userId
- roles
properties:
name:
type: string
description: The name of the organization (lowercase, used as the slug).
display_name:
type: string
description: Friendly display name for the organization.
userId:
type: string
description: Existing user id to add as a member and assign roles to.
roles:
type: array
description: List of role ids to assign to the member within the organization.
items:
type: string
steps:
- stepId: createOrg
description: >-
Create a new organization within the tenant.
operationId: post_organizations
requestBody:
contentType: application/json
payload:
name: $inputs.name
display_name: $inputs.display_name
successCriteria:
- condition: $statusCode == 201
outputs:
orgId: $response.body#/id
- stepId: addMember
description: >-
Add the supplied user as a member of the new organization.
operationId: post_members
parameters:
- name: id
in: path
value: $steps.createOrg.outputs.orgId
requestBody:
contentType: application/json
payload:
members:
- $inputs.userId
successCriteria:
- condition: $statusCode == 204
- stepId: assignMemberRoles
description: >-
Assign the supplied role ids to the member within the context of the
organization.
operationId: post_organization_member_roles
parameters:
- name: id
in: path
value: $steps.createOrg.outputs.orgId
- name: user_id
in: path
value: $inputs.userId
requestBody:
contentType: application/json
payload:
roles: $inputs.roles
successCriteria:
- condition: $statusCode == 204
outputs:
orgId: $steps.createOrg.outputs.orgId
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.