Questions tagged [namedcredentials]
The namedcredentials tag has no usage guidance.
294
questions
1
vote
0
answers
25
views
Using per subscriber callout from managed package
I'm creating a managed package that includes a callout to a custom REST API endpoint. Based on this conversation thread, it appears that the "new" External Credentials are not supported for ...
1
vote
0
answers
33
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 ...
0
votes
0
answers
27
views
OAUTH_DISALLOWED_SCOPES error when authorizing named credential
I am trying to create a named credential to authorize access to the Salesforce metadata API, as explained in this blog:
https://gscloudsolutions.com/tips-tricks/using-named-credentials-with-the-apex-...
0
votes
0
answers
88
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 ...
0
votes
0
answers
46
views
External Credential Flow (Existing_link)
Struggeling to Authenticate to Microsoft AD With Open ID Connect using Named Credentials/External Credentials.
First of all: This approach works on all Salesforce Instances, now I have this issue on a ...
0
votes
0
answers
84
views
Named Credential Principal Data Disappeared
I have a named Credential that has worked for months. I see in my logs that the integration successfully updated a record on 6 days ago, but today it failed due to a missing credential in Setup. I ...
0
votes
0
answers
58
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 ...
0
votes
1
answer
54
views
Apex Callout - Use Named Credential Password Placeholder in setEndpoint [duplicate]
I've created an Apex class to call a custom rest api endpoint for a Snowflake database.
The call is pretty basic in that you just include the token and a query in the endpoint Url.
I would like to use ...
2
votes
0
answers
61
views
How to use a Named Credential within an Auth. Provider Plugin?
I'm currently working on an Apex Auth Provider Plugin, and I've encountered a PMD code scan error with the following message:
Suggest named credentials for authentication. Rule: Security-...
0
votes
0
answers
35
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 ...
0
votes
0
answers
243
views
Callout failed for invocable action
I'm trying to set up a FLOW with an HTTP Callout "GET" request and I'm getting the below exception.
Info
Error Occurred:
Callout failed for invocable action
GetProspectLinkedinSearchTest....
0
votes
0
answers
78
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 ...
0
votes
0
answers
115
views
OAuth Client Credentials flow for external services - token expiration
I'm trying to connect to Marketo REST API via an external service leveraged in a flow, using the client credentials external credential and a named credential. Here is Marketo's doc on authentication
...
0
votes
0
answers
113
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 ...
0
votes
1
answer
249
views
OAuth 2.0 in External Credential
This is a question about using OAuth 2.0 protocol with Salesforce's Named and External Credentials.
I created an External Credential with OAuth, Client/Secret, and token ID URL. I created the ...
1
vote
0
answers
154
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 ...
1
vote
0
answers
232
views
Salesforce Named Credentials - oauth token refresh does not work
I am using Named Credentials to make callouts to a sharepoint system.
Initially, callouts from apex code work fine, until the token expires after 12 hrs. Then I am consistently receiving below error:
...
0
votes
0
answers
51
views
Trouble using HTTP callout action in Flows with AWS Signature Version 4
I'm trying to make a very simple AWS API call out using an HTTP callout (POST request) in salesforce but I have been getting the following error.
{"__type":"InvalidSignatureException&...
7
votes
1
answer
1k
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)
...
0
votes
1
answer
93
views
Named Credentials access issue to customer Portal user
Named credentials developed for a Customer Portal working fine for Admins,
but where as the customer portal users have access issues even after
adding the User to the Permission set and
adding the ...
1
vote
1
answer
113
views
External named Credential is not able to fetch in Apex code for Winter 24 Pre
Created the External Named credential with name Samsung Test
Added the Principal
Added the permission set
However I am not able to fetch this named credential in Apex code.
HttpRequest req = new ...
1
vote
1
answer
107
views
Invocable Method to return External Service data type
Ideally, we will create an External Service based on the API Schema and use it in Flows.
For some reason, when we do callouts in the Flow, the API cannot parse the Authorization header correctly, ...
0
votes
0
answers
137
views
Salesforce Named Credential HMAC merge function \n new line not work in value
I am trying to make an api integration using named credential with custom provider, making use of the merge function BASE64ENCODE HMAC for a signing value
in summary, I am not getting the same value ...
-1
votes
2
answers
169
views
Named Credentials of type custom for authorization [duplicate]
We have the following logic implemented to get the access Token and we want this to be implemented using the Named credentials
Http http = new Http();
HttpRequest request = new HttpRequest();
req....
1
vote
1
answer
482
views
External Credential - merge parameters in callout body
So I have created a secure endpoint named credential with an external credential. The external credential has 1 principal with two properties, client_id and client_secret. Now I can't find any way to ...
0
votes
0
answers
75
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 ...
0
votes
0
answers
54
views
OAuth Token Authentication Issue
Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__mdt.
Auth. Provider is setup for "ABC" and same details we are storing in ...
2
votes
1
answer
245
views
Callout via Named Credentials with client credentials oAuth flow
I'm trying to set up an external service that will rely on REST API calls from Salesforce to Marketo, which relies on client credentials OAuth 2.0 to authenticate. To authenticate with the Marketo API,...
1
vote
0
answers
188
views
How to Configure Named Credentials in Salesforce for External Callouts Using Client ID and Client Secret?
I'm in the process of integrating Salesforce with an external service. In our scenario, an LWC page calls a method in its Apex controller. This method then initiates an external callout to obtain a ...
1
vote
2
answers
169
views
Store settings and API credentials in packaged CMDT records
My current Managed Package supports a single GPT API and covers that with multiple packaged components:
Protected Custom Setting for secure storage of API credentials (Named Creds don't work)
Custom ...
0
votes
1
answer
433
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 ...
5
votes
1
answer
599
views
Correctly grant access to packaged Named Credentials
My Managed Package uses External APIs and packages External Credential and Named Credential artifacts.
I also have packaged a Permission Set, and I tried hard to make use those packaged Credentials. ...
3
votes
3
answers
2k
views
External credentials principals set for basic auth but fields are not found
I'm trying to use Named Credentials to authenticate to an external API. I read some tutorials, found out that they where basically all indicating the same method, so here is what I did so far :
In ...
0
votes
0
answers
41
views
Apex setEndpoint returning Bad Response - 401
I am trying to make a GET request:
public class SalesforceConnect {
public static String getCasesFromSalesforceOrgB() {
Http http = new Http();
HttpRequest request = new ...
0
votes
0
answers
110
views
Get Refresh Token after callout failure
Named Credentials is setup for "ABC" and same details we are storing in ABC_Metadata__c.
We are storing Refresh Token and Access Token in one record custom object Token__c.
We have one ...
2
votes
1
answer
468
views
Cannot Add Principal To Named Credential
I am trying to create a named credential with a principal using the instructions at this URL - Using API Keys with Named Credentials
But, in the "Store an API Key as an Authentication Parameter ...
0
votes
0
answers
34
views
Couldn't authenticate third party Api from external credentials
I am trying access Xero API from Salesforce. For authentication I created an app in Xero and used id and secret key to create openid auth. provider in Salesforce.
I used that Authentication provider ...
0
votes
0
answers
101
views
Storing tokens for custom token management
I'm working with an API that does not follow typical OAuth standards and requires custom headers for passing the token. Typically I would use Named Credentials, but due to the atypical pattern it is ...
0
votes
0
answers
59
views
Need to build inbound integration (webhook) to receive and decrypt (AES256) data
I've built many inbound integrations where an external system (e.g. Twilio) sends data to a webhook (https site URL setup on Salesforce, with Public Access to an Apex class) that handles that inbound ...
-2
votes
1
answer
2k
views
The callout couldn't access the endpoint. You might not have the required permissions, or the named credential
I have created a named credentials which has a endpoint like this and it is authenticated
https://#######-#####.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=####&deploy=1
while ...
0
votes
1
answer
283
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 ...
-1
votes
2
answers
324
views
Named Credentials not retrieving end point
EDITTED DUE TO CONFUSION:
I'm trying to concatenate url param into the named credentials
String endpoint: 'callout:XXXX' + EncodingUtil.urlEncode('PARAMS', 'utf-8');
and im getting:
The callout couldn'...
0
votes
0
answers
363
views
Named callout Null in http request with named credential - What would cause it?
I am making a callout and getting the error
"System.CalloutException: The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "XXX"...
0
votes
1
answer
61
views
Reply to Trustpilot Review Service Reviews API returning 400 Bad Request
This is my code in Salesforce
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:TrustPilot/private/reviews/'+reviewId+'/reply?token='+token);
req....
0
votes
1
answer
642
views
Named Credentials Error - redirect_uri_mismatch
We have refreshed our sandbox, and I'm trying to restore functionality of a package that has stopped working after the refresh.
I'm following the package installation instructions, which are clear, ...
0
votes
1
answer
622
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 ...
0
votes
0
answers
364
views
Named Credential is not automatically refreshing the token
I am using a Tooling API credential to authenticate against the same Salesforce org so that I can get some tooling API data in Apex. I am using oauth 2 and initially my integration user has to go ...
1
vote
1
answer
400
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 ...
0
votes
0
answers
61
views
External Credentials with Per User
I'm currently migrating Legacy Named Credentials to External Credentials and for one of those I need to use Per-User. I assigned it to one of the Permission Sets. But I don't see how User can ...
0
votes
0
answers
117
views
Is it possible to set up a Microsoft Auth. Provider without a Callback URL?
I'm writing a feature that uses an API implemented on top of the Microsoft/Azure stack. To access the service, I'm first required to fetch an OAuth2.0 token.
URL to get the token: https://login....