Repository navigation
Description
Summary
sf org create scratch fails with RemoteOrgSignupFailed (error C-1016) when the Dev Hub is authenticated using an External Client App via sf org login jwt. The same command succeeds when authenticated via sf org login web (PlatformCLI).
Since Spring '26, Salesforce disabled creation of traditional Connected Apps by default — only External Client Apps can be created via the UI. This means the documented CI/CD path (sf org login jwt with an External Client App → sf org create scratch) is broken for any org that doesn't have the legacy Connected App org perm enabled by Support.
Steps To Reproduce
- Use any SFDX project (e.g., fork dreamhouse-lwc) with a minimal scratch org definition:
{
"orgName": "Test Scratch Org",
"edition": "developer",
"features": ["EnableSetPasswordInApi"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
}
}
}-
In your Dev Hub org, create an External Client App following the official docs (Create an External Client App in Your Org):
- Enable OAuth (scopes:
api,web,refresh_token/offline_access) - Enable JWT Bearer Flow
- Upload a self-signed certificate (RSA 2048-bit)
- Callback URL:
http://localhost:1717/OauthRedirect - Permitted Users: "Admin approved users are pre-authorized"
- Assign System Administrator profile
- Enable OAuth (scopes:
-
Authenticate to the Dev Hub (succeeds):
sf org login jwt \
--client-id <CONSUMER_KEY> \
--jwt-key-file server.key \
--username <USERNAME> \
--instance-url https://<MYDOMAIN>.my.salesforce.com \
--alias DevHub --set-default-dev-hub- Create a scratch org (fails):
sf org create scratch \
--definition-file config/project-scratch-def.json \
--duration-days 1 --target-dev-hub DevHubExpected result
Scratch org is created successfully, as it does when the same Dev Hub is authenticated via sf org login web (PlatformCLI).
Actual result
{
"name": "RemoteOrgSignupFailed",
"message": "We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.",
"actions": [
"See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_error_codes.htm for information on error code C-1016."
],
"data": {
"username": "[email protected]",
"orgId": "00Dal00001NnHKbEAN",
"scratchOrgInfoId": "2SRVz0000005UjqOAE"
},
"code": "RemoteOrgSignupFailed"
}Additional information
- The JWT authentication step itself succeeds — only scratch org creation fails
- The same Dev Hub + same scratch org definition works perfectly when authenticated via
sf org login web(PlatformCLI) - Tested on both macOS (local) and Ubuntu (GitHub Actions) — same error on both
- The scratch org signup process internally tries to replicate/authorize the Connected App into the new scratch org, and this step fails when the auth was done via an External Client App
- Since Spring '26, the Salesforce docs state: "Creating connected apps is now disabled by default, because connected apps are being deprecated." (ref). This means the only documented CI/CD auth path for new orgs (External Client App + JWT) doesn't work with scratch org creation
- Our workaround is using
sf org login sfdx-urlwith a stored auth URL fromsf org login web, but this has refresh token durability concerns and is not the documented CI approach - Salesforce Support Case also open for this org
Shell: zsh (macOS Terminal)
System Information
{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.125.2",
"nodeVersion": "node-v22.22.0",
"osVersion": "Darwin 25.3.0",
"rootPath": "/opt/homebrew/Cellar/sf/2.125.2/libexec/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.40 (core)",
"@oclif/plugin-commands 4.1.40 (core)",
"@oclif/plugin-help 6.2.37 (core)",
"@oclif/plugin-not-found 3.2.74 (core)",
"@oclif/plugin-plugins 5.4.56 (core)",
"@oclif/plugin-search 1.2.38 (core)",
"@oclif/plugin-update 4.7.19 (core)",
"@oclif/plugin-version 2.2.36 (core)",
"@oclif/plugin-warn-if-update-available 3.1.55 (core)",
"@oclif/plugin-which 3.2.43 (core)",
"@salesforce/cli 2.125.2 (core)",
"agent 1.30.6 (core)",
"apex 3.9.10 (core)",
"api 1.3.10 (core)",
"auth 4.1.6 (core)",
"data 4.0.73 (core)",
"deploy-retrieve 3.24.11 (core)",
"info 3.4.105 (core)",
"limits 3.3.78 (core)",
"marketplace 1.3.10 (core)",
"org 5.9.69 (core)",
"packaging 2.25.5 (core)",
"schema 3.3.94 (core)",
"settings 2.4.57 (core)",
"sobject 1.4.84 (core)",
"telemetry 3.8.0 (core)",
"templates 56.9.3 (core)",
"trust 3.7.114 (core)",
"user 3.6.52 (core)"
]
}
Activity
github-actions commentedon Mar 5, 2026
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
WillieRuemmele commentedon Mar 5, 2026
Hi @cloudconsultants - the scratch org creation team is aware of this issue, and have provided us with the current workaround/information
so it sounds like you'll need to reach out and open a case to reenable this for now
JulianKloosterhuis commentedon Mar 12, 2026
I encountered the same issue. Is there an update to the case mentioned above?
cloudconsultants commentedon Mar 12, 2026
Goobles commentedon May 8, 2026
Having the same problems here
we are managing access for our developers to 100+ orgs automatically through scripting, passwordless, so
sf org login webis not an option for us. Also we are using multiple external client apps to be able to revoke access given to a user that connects with this org using the sf cli after the fact.This problem makes scratch org development impossible for us and makes it so the opsec team has to create sandboxes and scratch orgs for the eng team beforehand, the eng's can't self service because of this
vikyaiyer1997-xen commentedon May 19, 2026
Following up on this issue for further updates. Is it really necessary to create a Connected App given that it is being deprecated? Also, is there any tentative timeline for when the external client app will start supporting scratch org creation?
rondinardo commentedon Jun 15, 2026
This has been open three months and still no fix? @WillieRuemmele can you please give us more information? It's getting ridiculous at this point.
mrdailey99 commentedon Jun 25, 2026
We are also facing this issue after switching to ECAs and authenticating using JWT Bearer flow. Intermittently the
sf org login jwtcommand will pass, but then always fails at thesf org create scratchstep in our CI workflow. We've tried with different versions of node, 20, 22, and 24.Goobles commentedon Jun 25, 2026
I made a case with sf support to reenable Connected App creation for all the 60 production orgs we manage. That solved it for us. (until they fix this command to not depend on ConnectedApps)
JonnyPower commentedon Jun 29, 2026
echo this - frustrating to say the least - pretty huge gap that appears to have no progress for months.
AdamOfHyrule commentedon Jul 15, 2026
Also getting the same issue with ECAs and all good on connected apps. Unable to migrate scratch org creation and passwordless entry over to ECAs without this working
joeyweaver commentedon Jul 22, 2026
Same issue here — ECA + JWT bearer,
sf org login jwtsucceeds,sf org create scratchfails with C-1016 every time.Since this has been open a while, sharing what actually worked for us rather than another +1.
Root cause, as far as I can tell: Proxy Signup replicates the session's Connected App into the new scratch. When the Dev Hub session is an ECA there's nothing equivalent to replicate, so signup dies. The CLI always derives the signup app from the session, so there's no flag to influence it.
Workaround: skip the CLI for the signup step and insert the
ScratchOrgInforecord directly, pinning the signup app to Salesforce's own built-in CLI app:Both fields are required together — send the consumer key without the callback URL and the insert fails with
REQUIRED_FIELD_MISSING [ConnectedAppCallbackUrl].PlatformCLIalready exists in every org, so Proxy Signup only ever references it and never tries to create anything — C-1016 can't fire. Then pollScratchOrgInfo.StatusuntilActiveand exchange the returnedAuthCodefor the scratch's own tokens againstclient_id=PlatformCLI(public client,redirect_uri=http://localhost:1717/OauthRedirect).Worth saying why this works, because it isn't really a trick: the
ScratchOrgInfoAPI requires the signup app to be named explicitly, so it can never inherit the session's app the waysf org create scratchdoes. The CLI just doesn't expose a way to say it.Verified end to end on exactly the setup in this issue's title — same org, same user, same Dev Hub, same JWT-bound ECA session. The only variable is how the signup app is supplied:
sf org create scratchScratchOrgInfoinsertPlatformCLIStatus = Active, usable scratch + tokensNet effect: you keep the ECA + JWT service credential on the Dev Hub — no
sf org login web, no user-bound refresh token sitting in a secret — and scratch creation works. That combination is otherwise impossible today, which I think is what @Goobles and @mrdailey99 are blocked on.Two other things that cost us time and might save someone else some:
sf org delete scratchhas the same Connected App dependency. Deleting theActiveScratchOrgrecord over REST sidesteps it, so CI teardown keeps working.ExtlClntApp*Tooling object — so it can look like ECAs don't support JWT at all when they do.Working implementation here — MIT, zero dependencies, with GitHub Actions workflows (provision → deploy → test → teardown) and a mock-based test harness so you can try it without touching an org:
https://github.com/Amphora-AI/eca-scratch
To be clear, this is a workaround, not a fix. Decoupling signup from the session isn't a documented API, and if Proxy Signup changes it breaks. A support case per Dev Hub still isn't realistic at any scale — several people in this thread are managing dozens to hundreds of orgs — so a real fix would still be very welcome.
@WillieRuemmele — would exposing the signup Connected App as a flag on
sf org create scratchbe something the team would consider? It looks like it would unblock this thread without waiting on full ECA support in Proxy Signup.2 remaining items
git2gus commentedon Jul 22, 2026
This issue has been linked to a new work item: W-23543471
WillieRuemmele commentedon Jul 22, 2026
We've published a pre-release build you can test against your ECA + JWT Dev Hub setup:
This adds support for two environment variables:
To test:
Install the pre-release plugin:
Set the env var and run your normal scratch org create:
export SF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI sf org create scratch -f config/project-scratch-def.json -v MyDevHub -y 1Verify delete also works:
The env vars are intentionally temporary — once the platform handles ECA replication natively these become no-ops. Priority order for the consumer key is:
--client-idflag >SF_SCRATCH_SIGNUP_CONNECTED_APPenv var > hub session clientId >PlatformCLIdefault.@joeyweaver — would appreciate a run through your standing ECA + JWT setup if you get a chance. Both the create and delete paths would be great to confirm.
AdamOfHyrule commentedon Jul 22, 2026
Great work so far chaps. I just tried it out but not working for me
Installed pre release
@salesforce/cli: Installing plugin org@eca... installed v5.11.23-eca.0ECA Setup: JWT, scopes: api, web, refresh, permission set bound (Admin approved users), callback: http://localhost:1717/OauthRedirect
Authenticated default devhub succssfully with ECA client id:
sf org login jwt --set-default-dev-hub1st Try (No env)
sf org create scratch -y 1 --edition developerError
Error (RemoteOrgSignupFailed): We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.I see an Error on the ScratchOrgInfo - C-1016
────────────── Creating Scratch Org ──────────────
✔ Prepare Request 67ms
✔ Send Request 10.78s
◯ Wait For Org - Skipped
✔ Available 7ms
✘ Authenticate 4ms
◼ Deploy Settings
◼ Done
2nd Try (with env)
SF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI sf org create scratch -y 1 --edition developerError
Error (NamedOrgNotFoundError): No authorization information found for <DevHub username>.────────────── Creating Scratch Org ──────────────
✔ Prepare Request 540ms
✘ Send Request 3.88s
◼ Wait For Org
◼ Available
◼ Authenticate
◼ Deploy Settings
◼ Done
Request Id: ✘
OrgId: ✘
Username: ✘
Elapsed Time: 4.44s
Despite the error, I see an Active ScratchOrgInfo record in the system - But the CLI is not authenticated with the new org
WillieRuemmele commentedon Jul 22, 2026
@HyruleConsulting we've published an updated build with the fix:
Then:
export SF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI sf org create scratch -f config/project-scratch-def.json -v MyDevHub -y 1This should now work through the full cycle — signup, auth, settings deployment, and subsequent token refreshes. Delete should also work since it operates on the Dev Hub's existing connection (no signup flow involved).
SF_SCRATCH_SIGNUP_CALLBACK_URLis also available if you need to override the callback (defaults tohttp://localhost:1717/OauthRedirectwhich should be fine for most setups).Let us know how it goes.
AdamOfHyrule commentedon Jul 22, 2026
Test Setup
sf plugins install @salesforce/plugin-org@eca--> installed v5.11.23-eca.1sf org login jwt --set-default-dev-hub ...Can confirm Callback URL on ECA is http://localhost:1717/OauthRedirect
Test 1 (With Env Variable)
SF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI sf org create scratch -y 1 --edition developerOutcome : Scratch Org Info Status = Active + CLI Error - see below
────────────── Creating Scratch Org ──────────────
✔ Prepare Request 55ms
✔ Send Request 10.92s
◯ Wait For Org - Skipped
✔ Available 4ms
✘ Authenticate 4ms
◼ Deploy Settings
◼ Done
Request Id: ***
OrgId: ***
Username: ***
Elapsed Time: 11.00s
Error (NamedOrgNotFoundError): No authorization information found for ***.
Test 2 (without Env variable)
sf org create scratch -y 1 --edition developerOutcome: Scratch Org Info Status = Error + CLI Error - see below
────────────── Creating Scratch Org ──────────────
✔ Prepare Request 48ms
✘ Send Request 2.97s
◼ Wait For Org
◼ Available
◼ Authenticate
◼ Deploy Settings
◼ Done
Request Id: ✘
OrgId: ✘
Username: ✘
Elapsed Time: 3.03s
Error (RemoteOrgSignupFailed): We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.
WillieRuemmele commentedon Jul 22, 2026
@HyruleConsulting - thanks for the testing, and sorry it's failing... I think I found the issue 🤞 I'm publishing another
plugin-org@eca, should beeca.2- if you can try again, that'll be great! Please use the--dev-debugflag if it doesn't work so I can trace it through, and see if this env var override approach will fully workjoeyweaver commentedon Jul 22, 2026
I'll be able to pick up some testing and provide feedback this evening
mark-ramsell commentedon Jul 22, 2026
Also testing
AdamOfHyrule commentedon Jul 22, 2026
No problem at all @WillieRuemmele
Test Setup
sf plugins install @salesforce/plugin-org@eca --> installed v5.11.23-eca.2sf org login jwt --set-default-dev-hub ...Test 1 (With env variable)
SF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI sf org create scratch -y 1 --edition developerOutcome: successful Scratch org (PASS).
ScratchOrgInfo.AuthCode != null
ScratchOrgInfo.ConnectedAppConsumerKey = PlatformCLI
Test 2 (without env variable)
sf org create scratch -y 1 --edition developerOutcome: CLI error (C-1016) (PASS - Expected due to platform limitation )
────────────── Creating Scratch Org ──────────────
✔ Prepare Request 48ms
✘ Send Request 4.34s
◼ Wait For Org
◼ Available
◼ Authenticate
◼ Deploy Settings
◼ Done
Request Id: ✘
OrgId: ✘
Username: ✘
Elapsed Time: 4.42s
Error (RemoteOrgSignupFailed): We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.
Great progress. I think the 2nd test is expected to be a CLI failure correct? I presume omitting the env variable/--client-id flag means the consumer key from the JWT auth is parsed and as I understand from the previous analysis in the comments - there is a limitation on the platform with regards to ECAs.
Thanks so much for your effort thus far
mark-ramsell commentedon Jul 22, 2026
Setup: GitHub Actions (self-hosted runner), Dev Hub on prod, authenticated via
sf org login jwtwith an External Client App consumer key. CLI@salesforce/[email protected], plugin pinned by exact version in the workflow.eca.1 (
5.11.23-eca.1) — same result as @HyruleConsulting: withSF_SCRATCH_SIGNUP_CONNECTED_APP=PlatformCLI, signup succeeded (ScratchOrgInfo → Active) but the create failed at Authenticate:eca.2 (
5.11.23-eca.2) — ✅ working end-to-end on the ECA + JWT path. Same pipeline, only the pin changed:sf org create scratch --definition-file ... --target-dev-hub <jwt-authed hub>→ created and authenticated (our pipeline then continued through package installs against the new org, so token refresh worked too)sf org delete scratchon the same org → clean delete, no leaked slotThanks @WillieRuemmele — this unblocks our weekly scratch-org bake. One request: when this graduates from the
@ecadist-tag, a note here would be appreciated so CI pins can move to the stable release.WillieRuemmele commentedon Jul 22, 2026
Thanks for all the testing @mark-ramsell / @HyruleConsulting , and for digging in @JonnyPower !!! - yes, now that we've confirmed this is working, and fixing pipelines, we'll work on merging this changes into
latest, we'll post back here, and of course, give everyone a shoutout in the release notes!also, note, this is just a workaround solution, the real solution is still being worked on and understood internally
chore(tests): re-introduce NUT tests
Reintroduce NUT tests (#112)
azanatta commentedon Sep 29, 2026
29 September '26, issue is still happening.