Skip to main content

Questions tagged [externalcredentials]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Named + External Credentials issue: Getting 502 error when access token for external system has expired

I'm new to the named credentials + external credentials combo. My task is to integrate with an external system using these features using client credentials flow and OAuth2.0. I was able to get it ...
Jacob Lao's user avatar
0 votes
0 answers
31 views

Can we put external credentials in a managed package? [duplicate]

I need to put a named credential and external credential in my managed package that I create. Furthermore, if not possible like this is it possible to create via the postInstall script??
Pogger Cheems's user avatar
-1 votes
0 answers
28 views

Getting error when we use Salesforce's new named credentials to assume IAM role via STS

When we use New named credentials to assume IAM role via STS, getting “System.CalloutException: We couldn’t get credentials from Amazon Session Token Service. Contact your Salesforce administrator. {0}...
Satheesh Kumar Natesan's user avatar
0 votes
0 answers
55 views

Updating External Credential Principal's Client Id and Client Secret via Apex

Using Apex, trying to: Create an External Credential for Client Credentials with Client Secret Flow Add a Principal with a Client Id and Client Secret Associate it with an existing Named Credential ...
nstuyvesant's user avatar
0 votes
0 answers
54 views

How to convert Legacy Named Credentials to new External Credentials?

I have a set of legacy named credentials connecting from one SF org to another, using OAuth2 protocol. Legacy credentials don't specify the Authentication Flow Type. Instead, they attempt to log in to ...
Foo Bar's user avatar
  • 303
2 votes
0 answers
159 views

How can I retrieve custom parameters from External Credentials with Apex?

I'm looking to retrieve some External Credential information in an Apex class, and so far I've been successful in retrieving everything except for the parameters associated with the credential's ...
AM-KA's user avatar
  • 33
0 votes
0 answers
33 views

What is the authorization token format in a callout using Named Credentials with the OAuth 2.0 Browser Flow?

I'm making a callout to our backend using Named Credentials with the OAuth 2.0 Browser Flow. After setting it up, I ran a test in the Developer Console. Here's the log: 15:49:02:346 ...
vctqs1's user avatar
  • 95
0 votes
0 answers
32 views

How to create 2GP package when using JWT Bearer Type External Credentials

I am trying to create a 2GP managed package that includes named credentials / external credentials. The issue I'm having is related to the Authentication Flow Type of my external credential being 'JWT ...
Daniel Collier's user avatar
0 votes
0 answers
43 views

HMAC signing with Named Credentials and OAuth

Context I'm setting up an External Data Source pointing to an OData API. I've setup a Named Credential and an External Credential for it. The External Credential is configured to use OAuth2.0 (JWT ...
Jose Casimiro's user avatar
1 vote
1 answer
241 views

Using External Credentials to access REST API in current Org

I am looking to refresh a dashboard via a scheduled job using the Dashboard REST API. Historically, you would set up a Named Credential and Auth Provider, but I assume we can do this with the new ...
BritishBoyinDC's user avatar
2 votes
1 answer
166 views

How do you correctly populate an External Credential from a Principal for a Named Credential?

In Salesforce, I want to consume a web API which I can successfully call from my command line like: curl --location 'https://dummyapi.io/data/v1/user?limit=10' \ --header 'app-id: SomeApiKey' In ...
Brian Kessler's user avatar
3 votes
0 answers
377 views

External Credential: Custom Headers not Working (in OAuth Client Credentials/Secret Flow )

I have an external system that exposes an API with 2 endpoints: Token endpoint: Receives an Id + a Secret in the Authorization header, and a custom value in the user-agent header, and returns an ...
Douglas Molina's user avatar
2 votes
2 answers
103 views

External Credential for Amazon - SignatureDoesNotMatch

I'm trying to updload files from SF to S3 using an External Credential. My user has permissions to access the External Credential, User Credentials, and the Named Prinicipal. I have confirmed that the ...
hgolov's user avatar
  • 773
0 votes
0 answers
30 views

Can name/external credentials handle wrapped jwt?

the endpoint I'm authenticating with returns a Json response which contains the Jwt as a property of the Json. For example... { "id":"1234567890", "jwt": "Json ...
user432024's user avatar
2 votes
1 answer
176 views

How to set Client Id and Client Secret for External credential Principal from Apex

I am building a Getting started page for a Managed package App to easily configure External Credential. I am using ConnectApi.NamedCredentials.createExternalCredential method to dynamically create ...
Anmol Kumar's user avatar
  • 3,651
4 votes
2 answers
894 views

Getting the error : Unable to fetch the OAuth token when using an external credential with "Client Credentials with Client Secret Flow"

I am trying to make a webservice call to an authorization server (OAuth 2.0) using the "client_credentials" grant type, but i receive a "System.CalloutException: Unable to fetch the ...
user28829's user avatar
  • 706
0 votes
0 answers
71 views

Named Credential / External Credential Only Working Once

I've used a Named Credential with External Credential for the Client Credentials with Client Secret Flow. I didn't find the documentation very helpful to be honest, but this super post helped me get ...
Kash Hussain's user avatar
0 votes
1 answer
111 views

External Credentials : 'Basic' is not a valid value for the enum 'AuthenticationProtocol'

Got a weird one. I created a Named Credential and an associated External Credential. I documented this extensively and noted down exactly what I used in each field... The external credential was ...
TylerTwoForks's user avatar
3 votes
1 answer
225 views

External/Named Credential - acquiring access token from Mule via client credentials flow

I want to configure Named&External Credentials with oAuth client credentials flow and use it in apex. An endpoint is exposed by Mulesoft. I followed those very neat instructions shared here, but I ...
Ozobywatel's user avatar
2 votes
0 answers
57 views

Package Named Credentials such that they are editable by subscriber org

I was using legacy named credential till now and used to package a named credential with no authentication type. I used the same in my packaged apex code. Once the package was installed, the customers ...
Mohit Sharma's user avatar
0 votes
1 answer
63 views

Handling Encoded Responses in Salesforce OAuth2 External Credentials

I'm dealing with a specific issue in Salesforce related to External Credentials with OAuth2 protocol. The main problem is that Salesforce doesn't properly accept encoded responses from our ...
Damecek's user avatar
  • 1,948
2 votes
1 answer
426 views

Named Credentials in Managed Package Apex Callout

I am trying to create a managed package that has a callout to a webhook. Very simple use case, when opportunities or accounts change we want our server to be notified. I have setup some Apex triggers ...
tubbytoad42's user avatar
0 votes
0 answers
70 views

Issue with reading header variables with external credentials

enter image description hereI have a scenario where I use external credentials to call an external rest API to get a connection-token successfully. The external system requires a browser-based auth ...
Buyan Thyagarajan's user avatar
1 vote
0 answers
314 views

How to properly write custom header formula in External Credential?

I need to make callout to the Hotel Beds api. For an authentication headers I used External Credentials custom headers. But it is not properly creates headers(I guess). Hotel Beds requires following: ...
Ефименко Владислав's user avatar
1 vote
0 answers
302 views

Dynamically selecting external credentials with Named Credentials

We have a button that integrates with an external system using Named Credentials. We are using per-user authentication here and every user authenticates themselves with their external system username ...
salesforcets's user avatar
0 votes
0 answers
587 views

External Credentials not making oauth call

I am attempting to implement the Named Credential/External Credential system following this post and am getting "System.CalloutException: Unable to fetch the OAuth token." error. Everything ...
rgritt's user avatar
  • 1
0 votes
0 answers
284 views

Named Credential with Basic Authorization Token, Username and Password details

I am trying to callout to an external application APIs to fetch data into Salesforce. That external application has Auth token URL which will need below details to share Access token (bearer) to be ...
SFLearner's user avatar
0 votes
1 answer
107 views

Can We Dynamically Create Accept Header In External Credentials

We have an External Service which uses different accept headers based on the operation such as: Operation1 - application/op1+json Operation2 - application/op2+json Operation3 - application/op3+json ...
ddeve's user avatar
  • 1,606
0 votes
0 answers
74 views

Named Credential Auth 2.0 JWT Token giving empty error: "Unable to complete the JWT token exchange. Error: . Error description: ."

My JWT token is retrieved using only the following parameters in a json body: { "username":"blabla", "password":"blabla" } I don't need the standard JWT ...
Samuel Dias's user avatar
0 votes
0 answers
133 views

Callout named credential calls with a blob body

I am trying to launch a callout call to an OCR from an Apex method using a secured named credential with an external credential. The HTTP request is a POST request with multipart body containing a ...
Diaboloxx's user avatar
  • 101
0 votes
1 answer
580 views

Programmatically edit authentication parameter of external credentials

I was wondering if updating an authentication parameter of an External Credential was possible from an Apex method. The main goal of this function would be to programmatically store an access token ...
Diaboloxx's user avatar
  • 101
1 vote
0 answers
351 views

ConnectApi.NamedCredentials.deleteCredential not doing anything

I am working with the ConnectApi namespace NamedCredentials class to create and delete Named/External credentials programatically. Creation was easy enough but now I am struggling to delete. I am ...
David's user avatar
  • 33
14 votes
1 answer
5k views

External + Named Credential with oAuth client credentials flow

Given: a REST API that requires authorization. The authorization service attached to the API supports oAuth, one of the available oAuth flows is Client Credentials (grant_type=client_credentials) How ...
identigral's user avatar
  • 7,691
1 vote
0 answers
253 views

Rotating External Credential Principal

I am looking to call an external API from Salesforce using AWS Signature v4. The external API is using AWS API Gateway with IAM authorization enabled. I have created an access key for an IAM user and ...
GenePADI's user avatar
0 votes
1 answer
1k views

External Credential's 'Principal' not allowing multiple parameters

I'm trying to use Named Credential to authenticate to an external API. I'm storing the credentials(token and api-key) under 'Principals' in External Credential. But I noticed that when I'm adding ...
Akshay_SFDC's user avatar
0 votes
1 answer
811 views

Salesforce External Credentials Custom Body

I was configuring external credentials in Salesforce, but I noticed, there's no Custom Body on it, is there any way to add it using OAuth 2.0 Authentication Protocol? I'm only seeing Custom Headers ...
Erick Villamayor's user avatar
0 votes
1 answer
861 views

Using named/external credentials in an Apex trigger

Context: I have an Apex trigger for 'after insert' on EmailMessage. The trigger invokes a future method containing a callout i.e. @future(callout=true) This callout is a named credential which uses ...
Jacob's user avatar
  • 1
1 vote
1 answer
769 views

How to configure Salesforce to Salesforce integration using the the JWT Bearer Flow with a certificate via an External Credential?

I'm trying (and failing) to set up a connection between 2 Salesforce orgs. This AITechone video How to configure Named credentials in salesforce to connect 2 Salesforce Org ? explains how to use a ...
Keith C's user avatar
  • 136k
1 vote
0 answers
38 views

Making a callout with new Named Credentials gives an error [duplicate]

Making a callout with new Named Credentials + External Credentials gives an error System.CalloutException: We couldn't access the credential(s). You might not have the required permissions, or the ...
Andrii Muzychuk's user avatar
1 vote
1 answer
726 views

External Credentials in git

I have set up a Named Credential with a linked External Credential following the instructions here The External Credential has a linked Permission Set with 2 Authentication Parameters, username and ...
NickJ's user avatar
  • 680