Roles
ayx one role manages role assignments in Alteryx One. You can inspect who holds a role, add a subject to a role, and remove them. Assign and unassign are mutating; add --apply to commit.
Quick reference
Section titled “Quick reference”| Command | What it does |
|---|---|
role list-assignments <id> |
List all subjects assigned to a role |
role assign <id> <id> |
Assign a role to a subject |
role unassign <id> <id> |
Remove a role from a subject |
Listing assignments
Section titled “Listing assignments”# Who holds this role?ayx one role list-assignments <id>
# Machine-readableayx --output json one role list-assignments <id>Assigning a role
Section titled “Assigning a role”# Previewayx one role assign <id> <id>
# Commitayx one role assign \ <id> \ <id> \ --applyThe subject is typically a person ID. Use ayx one person list --all to find the right ID before assigning.
Unassigning a role
Section titled “Unassigning a role”# Previewayx one role unassign <id> <id>
# Commitayx one role unassign \ <id> \ <id> \ --apply --yesAutomation patterns
Section titled “Automation patterns”# Audit: dump all assignments for a roleayx --output json one role list-assignments <id> \ | jq '.data'
# Bulk assign: read subject IDs from a file, assign eachwhile IFS= read -r subject_id; do ayx one role assign \ <id> \ "$subject_id" \ --applydone < subject_ids.txt
# Verify a specific user holds a roleayx --output json one role list-assignments <id> \ | jq -e --arg uid "<person-id>" '.data[] | select(.id == $uid)' \ && echo "assigned" || echo "not assigned"Related
Section titled “Related”- Identity & auth
- Person — look up person IDs to use as subjects
- Safety model