PranavNagrecha/AwesomeSalesforceSkills / skills/admin/delegated-administration
delegated-administration
VerifiedUse when configuring delegated administration to allow non-system-admin users to manage specific user groups, reset passwords, assign permission sets, or administer custom objects. Covers the DelegateGroup metadata type (delegateGroups/*.delegateGroup-meta.xml), its roles / profiles / permissionSets / permissionSetGroups / groups / customObjects / loginAccess fields, delegate-group log-in-as, and the deploy and review path for them. NOT for creating, deactivating or licensing users yourself — use admin/user-management. NOT for auto-assigning permission sets from user attributes — use admin/user-access-policies.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 26.3 KB |
| references/examples.md | markdown | 6.1 KB |
| references/gotchas.md | markdown | 17.1 KB |
| references/llm-anti-patterns.md | markdown | 10.4 KB |
| references/metadata-examples.md | markdown | 12.0 KB |
| references/well-architected.md | markdown | 7.5 KB |
| scripts/check_delegated_administration.pyexecutable | script | 15.9 KB |
| templates/delegated-administration-template.md | markdown | 4.8 KB |
templates/delegated-administration-template.md
View on GitHub# Delegated Administration — Work Template
Use this template when setting up, reviewing, or troubleshooting delegated administration in a Salesforce org.
## Scope
**Skill:** `delegated-administration`
**Request summary:** (fill in what the user asked for)
**Task type:**
- [ ] New delegated admin group setup
- [ ] Review of existing delegated admin configuration
- [ ] Troubleshooting delegated admin permissions not working
- [ ] Custom object administration setup
---
## Context Gathered
Before starting, record answers to these questions:
| Question | Answer |
|---|---|
| Does the org have a defined role hierarchy? | |
| Who are the users that will act as delegated admins? | |
| Which roles (and their subordinates) should be in scope? | |
| Which profiles should be assignable by these delegated admins? | |
| Which permission sets (if any) should be assignable? | |
| Are custom object admin rights needed? If so, which objects? | |
| Do the delegated admin users currently have the Manage Users permission on their profile? | |
---
## Delegated Administrator Group Configuration
**Group Name (`label`):** _______________
**File:** `delegateGroups/________________.delegateGroup-meta.xml`
| Setup related list | `DelegateGroup` field | Value | Notes |
|---|---|---|---|
| Delegated Administrators (users) | *(Setup only — not in the file)* | | |
| Users in Delegated Group | `roles` | | Branch headcount: ______ (roles **and subordinates**) |
| Assignable Profiles | `profiles` | | Each one opened and read? |
| Assignable Permission Sets | `permissionSets` | | Modify All / View All / Author Apex checked? |
| Assignable Permission Set Groups | `permissionSetGroups` | | |
| Groups | `groups` | | Public groups managed users may be placed into |
| Custom Object Administration | `customObjects` | | Relationships and OWD are excluded — is that acceptable? |
| Enable Group for Login Access | `loginAccess` (**required**) | `true` / `false` | If `true`: approver ______, review date ______ |
Deployable shape and package.xml: `references/metadata-examples.md`.
---
## Approach
Which pattern from SKILL.md applies?
- [ ] Pattern 1: Setting up from scratch
- [ ] Pattern 2: Reviewing existing configuration
- [ ] Pattern 3: Troubleshooting permissions not working
Notes on approach:
_______________
---
## Checklist
- [ ] Delegated Administrator group created with a clear, descriptive name
- [ ] Delegated Administrators (users) added to the group
- [ ] Roles in "Users in Delegated Group" are correct — not too broad (see gotcha: role scope is additive)
- [ ] Assignable Profiles list is minimal and does not include System Administrator or high-privilege profiles
- [ ] Delegated admin users' own profiles have the "Manage Users" system permission enabled
- [ ] Delegated admin confirmed they can see Manage Users in personal setup (log in as user to verify)
- [ ] Tested: delegated admin cannot see or modify System Administrator users
- [ ] Tested: delegated admin cannot assign profiles outside the configured list
- [ ] Tested: delegated admin cannot manage users with no role assigned (document if this is a gap)
- [ ] (If custom object admin) Confirmed only the intended custom objects are listed
---
## Verification Run
| Step | Command / place | Result |
|---|---|---|
| Full retrieve | `sf project retrieve start --metadata DelegateGroup --metadata Role --metadata Profile --metadata PermissionSet` | |
| Static check | `python3 scripts/check_delegated_administration.py --manifest-dir <dir>` | ____ error(s), ____ warning(s) |
| Dry-run deploy | `sf project deploy start --source-dir .../delegateGroups --dry-run` | |
| Retrieve round-trip diff | re-retrieve, `git diff` — any dropped entries? | |
| Setup related lists match the file | Setup > Users > Delegated Administrators | |
| Negative test as the delegated admin | user outside the role branch; profile not in the list | |
---
## Known Limitations to Communicate
Record any platform constraints relevant to this request:
- System Administrator users cannot be managed by delegated admins — escalate to a full admin (unverified against the Metadata API guide; see `references/gotchas.md` #2)
- Users without a role assignment are not visible to delegated admins — roles must be assigned
- Custom object admin covers nearly every aspect of the named objects, including creating a custom tab, but never relationships or org-wide sharing defaults
- Delegated admins can only assign the profiles, permission sets, permission set groups, and public groups explicitly listed in their group
- With `loginAccess` true, the delegated admin can log in as the users they administer — subject to the org's login access policy
- There is no delegate-group SObject to query; verification is a retrieve round-trip plus Setup, not SOQL
---
## Notes
Record any deviations from the standard pattern and why:
_______________
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |