identity.app-organization.assign-role ​
Set or change a member's workspace role
Set or change a member's workspace role (group_slug), with audit.
Inputs: actor, organization_uuid, identity_app_uuid, app_organization_uuid, end_user_uuid, group_slug (all required); force (accepted and ignored — kept for callers written against the old last-owner guard). Writes role_updated_by/at on the membership. Mirrors identity.end-user.assign-group. Outputs: app_organization_uuid, end_user_uuid, previous_role, new_role, updated_at.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
actor | string | Yes | — | — |
organization_uuid | uuid | Yes | — | — |
identity_app_uuid | uuid | Yes | — | — |
app_organization_uuid | uuid | Yes | — | — |
end_user_uuid | uuid | Yes | — | — |
group_slug | string | Yes | — | — |
force | boolean | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
app_organization_uuid | uuid | No | — | — |
end_user_uuid | uuid | No | — | — |
previous_role | string | No | — | — |
new_role | string | No | — | — |
updated_at | string | No | — | — |
group_slug | string | No | — | — |
identity_app_uuid | uuid | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
reason | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.app-organization.assign-role",
"initial_data": {
"actor": "value",
"organization_uuid": "value",
"identity_app_uuid": "value",
"app_organization_uuid": "value"
}
}