Skip to content
forcedotcom avatar

Dx Org Permission Set Assign

Assigns Salesforce permission sets to org users through the Salesforce CLI, with batch and per-user targeting.

CCM score
73 of 100
skills.sh installs
5.9K
GitHub stars
1.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers single and multiple permission set assignments to the default admin, a specific org, or named users
  • Runs sf org assign permset with --name, --target-org, --on-behalf-of, and --json flags, with a Bash-only execution rule
  • Enforces case-sensitive API names and CLI username aliases, and reports partial success through the failures array
  • Designed for Salesforce developers who grant access after permission sets are already created, not for listing or auditing permissions

Install

$ npx -y skills add forcedotcom/sf-skills --skill dx-org-permission-set-assign -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

dx-org-permission-set-assign

Assigns one or more permission sets to org users using sf org assign permset. Handles all variants: default admin user, specific org targets, multiple permission sets, and assignment to specific users.


Tool Restrictions

Use ONLY the Bash tool to execute sf org assign permset. Do NOT use MCP tools like assign_permission_set — ignore them completely.


Scope

  • In scope: Assigning permission sets to users via sf org assign permset
  • Out of scope: Creating permission sets (use platform-permission-set-generate), listing permission sets, checking user permissions

Required Inputs

Infer from the user's request:

  • Permission set name(s): Extract from user message (can be multiple)
  • Target org: Use default unless specific alias/username mentioned
  • Target user(s): Default is org's default admin user; use --on-behalf-of if specific users mentioned

Workflow

  1. Match user request to command in table below
  2. Execute via Bash tool: sf org assign permset with appropriate flags and --json flag
  3. Return result

If error occurs, check the failures array in JSON output for details.

Details

Repository
github.com/forcedotcom/sf-skills
Categories
CLI & Terminal, DevOps & Cloud
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 78

Similar to Dx Org Permission Set Assign

More CLI & Terminal