Legacy Dev Forum Posts

 View Only

Sign Up

Salesforce data action to use OAuth 2.0?

  • 1.  Salesforce data action to use OAuth 2.0?

    Posted 06-05-2025 19:01

    Ray_Pipes | 2022-03-14 17:00:11 UTC | #1

    Is it possible to configure the Salesforce data action to use OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration (salesforce.com) , instead of the current Username ,Password and security Token ?

    It seems possible from the re: https://help.mypurecloud.com/articles/add-a-data-actions-integration/ .

    But i have no idea what the user defined oauth custom flieds would need to be .

    Has someone done the for salesforce and perhaps have a sample of what the field need to be for the user defined oauth for salesforce


    Mahmoud_Eldahshan | 2022-03-10 12:49:59 UTC | #2

    Hi,

    For OAuth2.0 you need to define the following:

    • Access Token URL (loginUrl): https://XXX.salesforce.com/services/oauth2/token
    • Client ID (clientId): Client ID of your app
    • Client Secret (clientSecret): Client Secret of your app
    • Username (username): Salesforce user with access to app.
    • Password (password): User password + security token (if any).

    In the custom auth action, the request should be . { "requestUrlTemplate": "${credentials.loginUrl}?grant_type=password&client_id=$esc.url(${credentials.clientId})&client_secret=$esc.url(${credentials.clientSecret})&username=$esc.url(${credentials.username})&password=$esc.url(${credentials.password})", "requestType": "POST", "headers": { "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "grant_type=client_credentials" }


    Ray_Pipes | 2022-03-10 22:57:11 UTC | #3

    Thanks ,

    This is what the customer gave me , not sure how that would line up to what you describe , any ideas ?


    Mahmoud_Eldahshan | 2022-03-11 07:53:53 UTC | #4

    Hi,

    I don't think Genesys support JWT for Salesforce, as per document they have Data Action JWT support for a couple of providers, Adobe I/O, Google Cloud Platform Service Account, and Google GSuite Service Account but I don't remember Salesforce within the list.

    You need to ask for passwords, client secret and with it you will have full info. Note: of course you can use Postman first to test your request.


    Jason_Mathison | 2022-03-14 18:50:57 UTC | #5

    We currently do not have built-in support for that Salesforce authentication type. While we do have a "Custom authentication" type of authentication, there is a good chance you are not going to be able to jump through the JWT hoops required in a custom auth action.

    I recommend voting for and adding your use case to this idea: https://genesyscloud.ideas.aha.io/ideas/OP-I-1127

    If this is something you need ASAP, and the customer won't budge on the authentication type, all I can suggest is that you route your requests through a lambda or intermediary web service that can authenticate in the way you need.

    --Jason


    Ray_Pipes | 2022-03-15 00:48:34 UTC | #6

    Thanks Jason for the info much appreciated .


    system | 2022-04-15 00:48:35 UTC | #7

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 13871