Skip to content

feat: add Connected App (OAuth 2.0) authentication to SalesforceTools #7774

@raghavenderreddygrudhanti

Description

Description

SalesforceTools currently supports two auth methods:

  1. Session ID + Instance URL
  2. Username + Password + Security Token

Many production Salesforce orgs use Connected Apps with OAuth 2.0 Client Credentials for headless server-to-server integrations. This avoids storing user passwords and is the recommended approach for automated flows.

Proposed Change

Add consumer_key and consumer_secret parameters to SalesforceTools.__init__ with SALESFORCE_CONSUMER_KEY / SALESFORCE_CONSUMER_SECRET env var fallbacks, enabling OAuth 2.0 Client Credentials authentication.

Use Case

Server-to-server integrations where no interactive user login is available (CI/CD pipelines, background agents, scheduled jobs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions