Skip to content

forcedotcom/sf-skills / plugins/builder/dx-org-lifecycle/skills/dx-org-permission-set-assign

dx-org-permission-set-assign

Verified

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.

FileKindSize
SKILL.mdskill md4.7 KB
examples/error_output.jsonconfig392 B
examples/success_output.jsonconfig245 B
references/cli_flags.mdmarkdown2.0 KB

references/cli_flags.md

View on GitHub
# CLI Flags Reference

Complete reference for `sf org assign permset` command flags.

## Required Flags

| Flag | Alias | Description | Example |
|------|-------|-------------|---------|
| `--name` | `-n` | Permission set to assign (can be repeated) | `--name MyPermSet` |
| `--target-org` | `-o` | Username or alias of the target org (required unless default is set) | `--target-org my-scratch` |

## Optional Flags

| Flag | Alias | Description | Example |
|------|-------|-------------|---------|
| `--on-behalf-of` | `-b` | Username or alias to assign the permission set to (can be repeated) | `--on-behalf-of user1@my.org` |
| `--api-version` | | Override the API version used for API requests | `--api-version 66.0` |

## Global Flags

| Flag | Description |
|------|-------------|
| `--json` | Format output as JSON (ALWAYS use this) |

## Usage Patterns

### Single Permission Set to Default Admin

```bash
sf org assign permset --name MyPermSet --json
```

### Multiple Permission Sets to Default Admin

```bash
sf org assign permset --name PermSet1 --name PermSet2 --json
```

### Assign to Specific Org

```bash
sf org assign permset --name MyPermSet --target-org my-scratch --json
```

### Assign to Specific Users

```bash
sf org assign permset --name MyPermSet --on-behalf-of user1@my.org --on-behalf-of user2@my.org --json
```

### Combined: Multiple Sets, Multiple Users, Specific Org

```bash
sf org assign permset \
  --name PermSet1 \
  --name PermSet2 \
  --on-behalf-of user1@my.org \
  --on-behalf-of user2@my.org \
  --target-org my-scratch \
  --json
```

## Important Notes

- **Multiple Values**: Use multiple `--name` or `--on-behalf-of` flags rather than comma-separated values
- **Spaces in Names**: Enclose permission set names with spaces in double quotes: `--name "Permission Set Name"`
- **Default Behavior**: Without `--on-behalf-of`, assigns to the org's default admin user
- **Processing**: Multiple users are processed sequentially to avoid auth file collisions
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall