Skip to content

[BUG]: sf org login jwt fails when the connected app requires DPoP #3691

Open

Description

@Kaloszer

Before You Submit

  • I'm using the latest version of Salesforce CLI
  • I've searched the existing issues
  • I've run sf doctor to diagnose common issues

Related Issue

No response

Command

sf org login jwt --client-id --jwt-key-file --username --instance-url

Org Type

Sandbox

Did this work before?

Not sure

Last Working Version

No response

Summary

sf org login jwt fails with JwtAuthError when the connected app has "Require Demonstrating Proof of Possession (DPoP) Extension" enabled. The CLI doesn't send DPoP proofs, so Salesforce rejects the token request with "app requires proof of possession". Salesforce's DPoP guide says the client must send proof-of-possession "in every token and resource request": https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_dpop_guide.htm

Repository to Reproduce

No response

Steps to reproduce

  1. Use a connected app with a JWT certificate and a pre-authorized user. Confirm sf org login jwt succeeds.
  2. Enable "Require Demonstrating Proof of Possession (DPoP) Extension" on the app.
  3. Re-run the same sf org login jwt command.

Expected Result

Login succeeds, or the CLI supports DPoP, or the docs say JWT bearer is exempt.

Actual Result

Login fails with:

JwtAuthError: Error authenticating with JWT.
Errors encountered:
app requires proof of possession
app requires proof of possession
user hasn't approved this consumer
audience is invalid [audience=https://login.salesforce.com login=<redacted>]

Error Message

See above

System Information

{
  "architecture": "wsl-x64",
  "cliVersion": "@salesforce/cli/2.158.7",
  "nodeVersion": "node-v22.23.2",
  "osVersion": "Linux 6.18.33.2-microsoft-standard-WSL2",
  "rootPath": "/home/r/.npm-global/lib/node_modules/@salesforce/cli",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 4.0.6 (core)",
    "@oclif/plugin-commands 5.0.9 (core)",
    "@oclif/plugin-help 7.0.6 (core)",
    "@oclif/plugin-not-found 4.0.7 (core)",
    "@oclif/plugin-plugins 7.0.13 (core)",
    "@oclif/plugin-search 2.0.10 (core)",
    "@oclif/plugin-update 5.0.10 (core)",
    "@oclif/plugin-version 3.0.7 (core)",
    "@oclif/plugin-warn-if-update-available 4.0.5 (core)",
    "@oclif/plugin-which 4.0.6 (core)",
    "@salesforce/cli 2.158.7 (core)",
    "agent 2.2.4 (core)",
    "apex 4.4.7 (core)",
    "api 2.0.28 (core)",
    "auth 6.0.5 (core)",
    "code-analyzer 5.9.0 (user) published 294 days ago (Wed Jan 28 2026) (latest is 5.16.0)",
    "community 3.3.41 (user) published 431 days ago (Sat Sep 13 2025) (latest is 4.0.27)",
    "data 5.1.26 (core)",
    "deploy-retrieve 4.3.2 (core)",
    "info 4.0.24 (core)",
    "limits 4.0.6 (core)",
    "marketplace 2.0.25 (core)",
    "org 7.0.13 (core)",
    "packaging 3.0.17 (core)",
    "schema 4.0.16 (core)",
    "settings 3.0.23 (core)",
    "sobject 2.0.22 (core)",
    "telemetry 4.2.4 (core)",
    "templates 57.6.0 (core)",
    "trust 4.1.0 (core)",
    "user 6.0.11 (core)",
    "@salesforce/sfdx-scanner 4.12.0 (user) published 567 days ago (Tue Apr 29 2025)",
    "apex-code-coverage-transformer 2.16.1 (user) published 288 days ago (Mon Feb 02 2026) (latest is 5.0.1)",
    "apextestlist 1.13.6 (user) published 430 days ago (Sat Sep 13 2025) (latest is 1.16.1)",
    "sfdx-git-delta 6.45.1 (user) published 145 days ago (Fri Jun 26 2026)"
  ]
}

Additional Information

The CLI's error says it is "likely not an issue with Salesforce CLI". The rejection comes from Salesforce's token endpoint.

Screenshots or Log Files

No response

Activity

  1. github-actions commented on Nov 18, 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.

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

    investigatingWe're actively investigating this issuevalidatedVersion information for this issue has been validated

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions