Auth0 · Arazzo Workflow

Auth0 Create API, Role and Bind Permissions

Version 1.0.0

Register an API with scopes, create a role, and associate the API's scopes with that role as permissions.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI AgentsAuthenticationAuthorizationFGAIdentity ManagementMCPOAuthOktaOpenID ConnectSAMLSecuritySCIMArazzoWorkflows

Provider

auth0

Workflows

create-resource-server-role-permissions
Register an API, create a role, and attach the API's permissions to the role.
Creates a resource server with scopes, creates a role, and associates the supplied permission pairs (for the API identifier) with the role.
3 steps inputs: apiName, identifier, permissions, roleName, scopes outputs: apiId, roleId
1
createApi
post_resource-servers
Register a new API (resource server) with the supplied scopes.
2
createRole
post_roles
Create a user role to hold the API's permissions.
3
bindPermissions
post_role_permission_assignment
Associate the supplied API permissions with the new role.

Source API Descriptions

Arazzo Workflow Specification

auth0-create-resource-server-role-permissions-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Auth0 Create API, Role and Bind Permissions
  summary: Register an API with scopes, create a role, and associate the API's scopes with that role as permissions.
  description: >-
    Builds an API and a matching access role in one flow. The workflow registers
    a new API (resource server) with its scopes, creates a user role, and
    associates the API's permissions with that role for Role-Based Access
    Control. 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: auth0ManagementApi
  url: ../openapi/auth0-management-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-resource-server-role-permissions
  summary: Register an API, create a role, and attach the API's permissions to the role.
  description: >-
    Creates a resource server with scopes, creates a role, and associates the
    supplied permission pairs (for the API identifier) with the role.
  inputs:
    type: object
    required:
    - apiName
    - identifier
    - scopes
    - roleName
    - permissions
    properties:
      apiName:
        type: string
        description: Friendly name for the API (resource server).
      identifier:
        type: string
        description: Unique audience identifier for the API.
      scopes:
        type: array
        description: List of scope definitions for the API.
        items:
          type: object
          required:
          - value
          properties:
            value:
              type: string
            description:
              type: string
      roleName:
        type: string
        description: Name of the role to create.
      permissions:
        type: array
        description: Array of resource_server_identifier / permission_name pairs to associate with the role.
        items:
          type: object
          required:
          - resource_server_identifier
          - permission_name
          properties:
            resource_server_identifier:
              type: string
            permission_name:
              type: string
  steps:
  - stepId: createApi
    description: >-
      Register a new API (resource server) with the supplied scopes.
    operationId: post_resource-servers
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.apiName
        identifier: $inputs.identifier
        scopes: $inputs.scopes
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      apiId: $response.body#/id
  - stepId: createRole
    description: >-
      Create a user role to hold the API's permissions.
    operationId: post_roles
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.roleName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      roleId: $response.body#/id
  - stepId: bindPermissions
    description: >-
      Associate the supplied API permissions with the new role.
    operationId: post_role_permission_assignment
    parameters:
    - name: id
      in: path
      value: $steps.createRole.outputs.roleId
    requestBody:
      contentType: application/json
      payload:
        permissions: $inputs.permissions
    successCriteria:
    - condition: $statusCode == 201
  outputs:
    apiId: $steps.createApi.outputs.apiId
    roleId: $steps.createRole.outputs.roleId