function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Francesco Boccassi DltFrancesco Boccassi Dlt 

Outbound callout OAuth 2.0 External Provider

Dear All,
I'm struggling with OAuth 2.0. In fact, the customer asked to recall external API from Salesforce that needs OAuth 2.0 authentication with grant type=client_credentials.
Do you know what should I do? I need your help as soon as possible since I need to release next week. I've configured Named Credential and I'm trying to configure the Auth. provider, but I don't know how. I've seen there are some standard Auth providers like google and facebook, but how can I configure the customer one?

The customer gave me the following info:
Client_id= xxxxx
Client_Secret= xxx
- url = xxxx
grant_type = client_credentials
- Method: POST
- Header: authorization: Basic base64(client_id:client_secret) (This header can only be used if 'client_id' and 'client_secret' are NOT found within the message body and vice versa!)
- Header: content-type: application/x-www-form-urlencoded
- Endpoint = /auth/oauth/v2/token
- Parameters = Parameters: grant_type=client_credentials&client_id=a-client_id&client_secret=a-client_secret&scope=a-list-of-scope-values
- Header = content-type: application/json
- Body = { "access_token":"xxxx", "token_type":"Bearer", "expires_in":3600, "scope":"openid email" }
 
Joseph PingletonJoseph Pingleton

Hi Francesco,

I'm in a similar situation. Did you ever find a solution to this? Thanks!