Skip to content

sf org create scratch fails JWT for preview release with "External client app is not installed in this org" #3638

Open

Description

@nwcm

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

creating a scratch org with release: preview fails

Seems related to #3515 (comment), but creating this separately as it works with current release but not on preview

Steps To Reproduce

  1. auth dev hub with JWT via an ECA
  2. attempt to create scratch org with "release": "preview",
  3. See failure.

Does not fail with no release key set

Expected result

sf org create scratch creates preview scratch org when using JWT auth with dev hub

Actual result

@{name=JwtAuthError; message=Error authenticating with JWT.
Errors encountered:
External client app is not installed in this org
External client app is not installed in this org
user hasn't approved this consumer
External client app is not installed in this org
External client app is not installed in this org; exitCode=1; context=OrgCreateScratch; stack=JwtAuthError: Error authenticating with JWT.
Errors encountered:
External client app is not installed in this org
External client app is not installed in this org
user hasn't approved this consumer
External client app is not installed in this org
External client app is not installed in this org
    at SfCommandError.from (file:///opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)
    at OrgCreateScratch.catch (file:///opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:333:47)
    at OrgCreateScratch._run (/opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:187:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async Config.runCommand (/opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:389:25)
    at async run (/opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)
    at async file:///opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli/bin/run.js:15:1; cause=undefined; warnings=System.Object[]; code=JwtAuthError; status=1; commandName=OrgCreateScratch}

Additional information

System Information

{
  "architecture": "linux-x64",
  "cliVersion": "@salesforce/cli/2.149.9",
  "nodeVersion": "node-v24.19.0",
  "osVersion": "Linux 6.17.0-1022-azure",
  "rootPath": "/opt/hostedtoolcache/node/24.19.0/x64/lib/node_modules/@salesforce/cli",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.56 (core)",
    "@oclif/plugin-commands 4.1.63 (core)",
    "@oclif/plugin-help 6.2.58 (core)",
    "@oclif/plugin-not-found 3.2.93 (core)",
    "@oclif/plugin-plugins 5.4.87 (core)",
    "@oclif/plugin-search 1.2.54 (core)",
    "@oclif/plugin-update 4.7.59 (core)",
    "@oclif/plugin-version 2.2.57 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.73 (core)",
    "@oclif/plugin-which 3.2.61 (core)",
    "@salesforce/cli 2.149.9 (core)",
    "agent 2.0.3 (core)",
    "apex 4.1.0 (core)",
    "api 2.0.9 (core)",
    "auth 5.0.6 (core)",
    "data 5.1.5 (core)",
    "deploy-retrieve 4.1.2 (core)",
    "info 4.0.9 (core)",
    "limits 4.0.3 (core)",
    "marketplace 2.0.5 (core)",
    "org 6.0.9 (core)",
    "packaging 3.0.5 (core)",
    "schema 4.0.5 (core)",
    "settings 3.0.5 (core)",
    "sobject 2.0.5 (core)",
    "telemetry 4.0.5 (core)",
    "templates 57.0.9 (core)",
    "trust 4.0.9 (core)",
    "user 5.0.1 (core)"
  ]
}

Activity

  1. added
    investigating
    on Aug 31, 2026
  2. github-actions commented on Aug 31, 2026

    @github-actions

    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.

  3. added
    validated
    on Aug 31, 2026
  4. k80bowman commented on Aug 31, 2026

    @k80bowman

    @nwcm Just for clarification, when you say that creating a scratch org with the current release works (without "release": "preview"), do you mean with the SF_SCRATCH_SIGNUP_CONNECTED_APP environment variable mentioned in #3515 (comment)?

  5. nwcm commented on Aug 31, 2026

    @nwcm
    Author

    @k80bowman no we do not set SF_SCRATCH_SIGNUP_CONNECTED_APP environment variable as part of any of our process. JWT authentication works without it on current release scratch org creation.

  6. k80bowman commented on Sep 1, 2026

    @k80bowman

    @nwcm Could you try creating the scratch org (with "release": "preview") using the environment variables as noted in our release notes and let me know if that works?

  7. nwcm commented on Sep 3, 2026

    @nwcm
    Author

    @k80bowman with the env variables set for creating a preview org, the create command works . Current release does not.

    JWT auth to the created scratch org does not work. meaning all use of JWT auth needs to be changed to url auth. With seems a downgrade in security to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingvalidated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions