Salesforce data action to use OAuth 2.0?

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: Add a data actions integration - Genesys Cloud Resource Center .

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

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" }

Thanks ,

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

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.

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

Thanks Jason for the info much appreciated .

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