feat: (developing-agentforce) use sf org create agent-user command#234
Merged
hsinghbisht-sfdc merged 6 commits intoforcedotcom:developfrom May 7, 2026
Merged
Conversation
Replace the legacy multi-step Einstein Agent User creation flow (profile query + record creation + permset assignment) with the new unified `sf org create agent-user` command available in SF CLI 2.131.7+. The new command works across all org types and auto-assigns required permission sets. Closes W-22190552 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shetzel
approved these changes
May 7, 2026
shetzel
reviewed
May 7, 2026
Co-authored-by: Steve Hetzel <shetzel@salesforce.com>
hsinghbisht-sfdc
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sf org create agent-usercommand (SF CLI 2.131.7+)agent-user-setup.md,agent-design-and-spec-creation.md,salesforce-cli-for-agents.mdChanges
agent-user-setup.md: replaced Steps 1–3 with singlesf org create agent-usercall; updated critical notes, troubleshooting table, and validation footeragent-design-and-spec-creation.md: updated "if no results returned" block to emit the new command and readresult.usernamesalesforce-cli-for-agents.md: replaced 4-step user creation section with the new single commandMotivation
The new command works across all org types (scratch, sandbox, production) and auto-assigns
AgentforceServiceAgentBase,AgentforceServiceAgentUser, andEinsteinGPTPromptTemplateUser— eliminating a common source of "Internal Error" on publish caused by missing permsets.Test Plan
sf --version)sf org create agent-userinstead of the legacysf data create recordflowresult.usernamewith a GUID suffix and all 3 permsets listed underpermissionSetsAssignedsf data query --json -q "SELECT Username, IsActive FROM User WHERE Profile.Name = 'Einstein Agent User' AND IsActive = true" -o <your-org>npm run validate:skills -- --changed --base=origin/mainand confirm it passesCloses @W-22190552@
🤖 Generated with Claude Code