Loading...
Loading...
ALWAYS USE THIS SKILL to assign permission sets to org users. Assign one or more permission sets to org users using the sf org assign permset command. TRIGGER when the user asks to assign, grant, give, add, or apply permission sets to users, admins, specific orgs, or specific users. Supports granting permissions, giving access, and adding permission sets to default admin or specific users via --on-behalf-of. DO NOT TRIGGER for listing permission sets or checking user permissions.
npx skill4agent add forcedotcom/sf-skills dx-org-permission-set-assignsf org assign permsetsf org assign permsetassign_permission_setsf org assign permsetplatform-permission-set-generate--on-behalf-ofsf org assign permset--jsonfailures| User intent | Execute via Bash tool |
|---|---|
| Assign one permission set to default admin | |
| Assign multiple permission sets to default admin | |
| Assign to specific org | |
| Assign to specific user(s) | |
| Assign multiple sets to specific users | |
| Constraint | Rationale |
|---|---|
Always use | Provides structured output for reliable parsing and error handling |
| Permission set names are case-sensitive | Use exact API names as they appear in the org |
Multiple | More efficient than separate commands per permission set |
Multiple | Batch assignment in single command; processed sequentially to avoid auth file collisions |
| Use CLI username aliases, not Salesforce User.Alias field | The |
| Duplicate assignments are idempotent | Re-assigning an already-assigned permission set succeeds silently |
| Partial success is possible | Command can return both successes and failures in one run; non-zero exit code if any failures |
| Issue | Resolution |
|---|---|
| Permission set name with spaces | Enclose in double quotes: |
| "PermissionSet not found" error | Verify permission set exists in target org; check for typos in name |
| Assignment succeeds but user doesn't see permissions | Check |
| "User not found" error | Username/alias doesn't exist in target org — verify with |
| Partial success (some users succeed, others fail) | Check JSON output — command returns both |
examples/success_output.jsonexamples/error_output.json| File | When to read |
|---|---|
| To understand successful assignment response structure |
| To handle common error scenarios |
| For detailed explanation of all available flags |