Skip to main content

Questions tagged [namedcredentials]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
23 views

How to Address Security Warnings About Named Credentials When Handling OAuth in Apex?

I am preparing to submit my Salesforce application for review to list it on Salesforce AppExchange. My application uses a custom OAuth authentication flow handled by an LWC component and Apex. The ...
bruno f's user avatar
0 votes
0 answers
31 views

How to use Named Credential + External Credential for Marketing Cloud Transactional Messaging API

I am trying to use Named Credential for Marketing Cloud Transactional Messaging API. And I am having issues sending SMS. I was able to setup an External Credential: Authentication Protocol = OAuth 2.0 ...
Ryonin's user avatar
  • 1
0 votes
0 answers
43 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
50 views

Named Credential - Refresh access token when not 401?

I'm trying to connect to an external system using legacy Named Credential and a custom Auth. Provider (with AuthProviderPlugin class). I'm able successfully call the endpoints when the access token is ...
sfdcnewbie'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
115 views

System.CalloutException: The callout couldn't access the endpoint

I have created an Apex REST endpoint and I want to test it using an integration user that I've also just set up. The integration user is using the "Salesforce Integration" User License. I've ...
Mike's user avatar
  • 1,199
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
1 vote
0 answers
25 views

Invoking a Per User Named Credential OAuth flow on click of a button

Here is my use Case. I am trying to connect Salesforce with another Salesforce org with Per User Identity Type. The Second Salesforce org is just to demonstrate that the process works and will ...
Aditya Sehgal'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
140 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
1 vote
1 answer
36 views

How to set scope in Auth provider for extending token expiry on JIRA server?

While setting up named credentials or Auth provider using OAuth2 for connecting to Jira on premise, The incoming link in JIRA is configured correctly and I am able to pull data but the session expires ...
goose's user avatar
  • 81
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
0 votes
0 answers
44 views

Issue with passing UTC time as Custom Header - Named Credentials

I have set up a named credential to call an external system and this need few Authorization headers for Authentication. One of the parameters related to Authentication is passing the current time in ...
KSL's user avatar
  • 512
0 votes
0 answers
392 views

Authenticated User "Unable to tunnel through Proxy..."

I have a connection between a Dev Box and a Full Box instance. I set up this way: Fullbox - Connected App Dev Box --> Named Credentials Uses Auth provider with login flow on save. --> Auth. ...
thinker's user avatar
  • 1,442
2 votes
1 answer
169 views

Safely Storing Client Credentials in Salesforce?

I'm trying to integrate with an external system using Authentication provider and Named credential. For this, I've created an Auth. provider with just Auth URL, Callback URL and a plugin class. Client ...
sfdcnewbie's user avatar
0 votes
0 answers
136 views

Difficulty Updating Named Credential Parameters via Metadata API in Salesforce

I'm encountering difficulties updating a Named Credential using the Metadata API in Salesforce. Below, I've outlined the steps I've taken to create the Named Credential and provided the code snippet I'...
Pavan's user avatar
  • 3
0 votes
0 answers
44 views

Seeking Best Practices for Authentication Setup Using Named Credentials

I'm currently working on implementing authentication using Named Credentials in my project. I'm looking for insights into the best practices widely used in the industry to ensure comprehensive ...
Pavan's user avatar
  • 3
0 votes
0 answers
56 views

Google Cloud Connection Works with Apex Auth Class but not with Named Credentials

I have hosted an API on google cloud run and the downloaded the service account credentials in below format. { "type": "service_account", "project_id": "...
aloomatar's user avatar
1 vote
1 answer
132 views

Access Named Credentials with Guest User

I have created a Rest Service which accepts incoming Webhooks from Concur to notify Salesforce an Expense Report is ready. I am then using a Callout Class to fetch the Expense Report details from ...
Jeff Callahan's user avatar
2 votes
1 answer
162 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
1 vote
0 answers
73 views

Characters truncated in named credentials custom header parameter

ConnectApi.ExternalCredential externalCred = ConnectApi.NamedCredentials.getExternalCredential('SN_JWT'); System.debug('externalCred :'+externalCred); when I run this code in salesforce ... in system....
karan bilakhiya's user avatar
1 vote
1 answer
108 views

Create Named Credential with authentication and user id in url parameters

I have an endpoint with the following format: https://test.com/api?salesforce=123&agent=123 Do Named Credentials allow me to store the salesforce value in the Named Credentials associated External ...
Tyler Zika's user avatar
  • 2,892
3 votes
0 answers
369 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
121 views

AWS S3: generating a pre-signed URL

I am trying to generate an AWS S3 pre-signed from Salesforce apex to use later to download file in lwc, see following sample code: HttpRequest request = new HttpRequest(); request.setMethod('GET'); //...
Harish's user avatar
  • 1
0 votes
0 answers
24 views

Execute Sync report api not giving correct result

We are using named credentials to call execute sync api(POST) call (https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_getreportrundata.htm). ...
Manuj Pandey's user avatar
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
0 votes
0 answers
49 views

Named Credentials I couldn't pass API key to Apex ==> Authentication Protocol Custom ==> Principals *Name = apiKey *Value=********* [duplicate]

public class WeatherDetailsClass { @AuraEnabled public static WeatherDetailsWrapper getWeatherDetails(String cityName) { // Frame the Endpoint URL String apiKey = '*************...
Albert's user avatar
  • 1
0 votes
1 answer
88 views

Using Session_Id in Manage Package?

We have a managed package that connects with an external system. As a manual step, we ask users to manually create an auth provider and named credentials. As part of the new release using ConnectApi ...
Ragul's user avatar
  • 541
-1 votes
1 answer
169 views

How to create Auth Provider using APEX

I could see AuthProvider Object support Create() and Update(), But when i try to insert its throwing following error. DML operations are not allowing on Auth. Provider Code: AuthProvider authPro = ...
Ragul's user avatar
  • 541
0 votes
0 answers
23 views

How to associate External Data Source with a named credentials?

I created an External Data Source following the steps given in the following link : https://help.salesforce.com/s/articleView?id=sf.search_define_federated_search.htm&type=5 However the External ...
PS7654's user avatar
  • 11
0 votes
0 answers
107 views

Get Presigned URL using named credentials

I successfully obtained the pre-signed URL to upload large file to aws s3 bucket using the method described in the article https://mtr-design.com/news/how-to-create-a-presigned-url-for-aws-s3-using-...
Mohamed Ashfak's user avatar
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
0 answers
54 views

Setup Name Credential with External Credentials

I'm starting developing on Salesforce, and I've to send some data to one of our client api. The client gave some access details to connect to their webapi. It looks like this : url POST https://...
kabrice's user avatar
  • 129
3 votes
1 answer
224 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
0 answers
60 views

Programatically give a user access to an ExternalCredential Principal (Per User)

I try to find a way to programatically give a user access to an ExternalCredential Principal (Per User). The standard way, is to go to personal settings and click "Allow Access". I found out ...
Elliot41's user avatar
0 votes
0 answers
180 views

We can’t log you in because of the following error. Remote_Error: The remote service returned an error

I have a strange case. I have custom Auth Provider, trying to authorize named credential and getting: Problem Logging In We can’t log you in because of the following error. For more information, ...
mattibrd's user avatar
2 votes
1 answer
113 views

Named Credential not created through SOAP Metadata API

We are connecting Salesforce from a third-party system, the requirement is to create some named credentials, custom metadata records, and remote site settings from the third-party System after ...
Rahul Gawale's user avatar
  • 12.2k
0 votes
0 answers
562 views

Can't find my Named Credential in Permission Set

I'm trying to give access of my Named Credential to a Profile, but I just can't find the Named Credential on the Available Named Credentials in the Permission Set. I already gave the Permission Set ...
Julian Gutierrez's user avatar
1 vote
1 answer
260 views

Creating a Named Credential with Apex

Trying to programmatically create a Named Credential and getting odd errors when trying to run this code: ConnectApi.ConnectApiException: Provide only the developer name of the external credential. ...
nstuyvesant's user avatar
1 vote
0 answers
20 views

2GP post-installation Lightning Tab - set ConnectedApp.oauthConfig.isAdminApproved to true and assign profiles

For a 2GP, putting together a UI for System Administrators to manually navigate to after installation to automate post-installation configuration. Here's the part I am working on... Sets ConnectedApp....
nstuyvesant's user avatar
0 votes
0 answers
33 views

Flosum-Jira connector : Named Credentials errored out while accessing

I am working on Flosum expert level certificate, where we integrate Jira with Flosum with Flosum Jira connector and using named credentials. How ever its popping an error while trying to config new ...
Sfuser's user avatar
  • 1
2 votes
1 answer
425 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
43 views

How to call salesforce service end point as current user while using Named credentials as LWC is the invoker based on user action

What is the best way to call salesforce service end point as current user. As Named credential authenticates as one specific user who initially authorizes it. I am calling my apex helper method from ...
Naren's user avatar
  • 19
1 vote
1 answer
474 views

Named Credential - Status: Unauthorized; Status Code = 401 - Working with Bearer Token but not with Callout

I have a Legacy Named Credential from UAT that I am porting over to PROD. To test the Named Credential, I am running an Apex Snippet in PROD but I am getting a 401 error. See below: However, when I ...
choco_butter's user avatar
0 votes
1 answer
165 views

Can we store a signing key in a Named Credential and use it via apex to generate a new JWT token

I have a requirement where I need to generate a new JWT token for authentication but we cannot hard code the signing key in apex or store the signing key in a Custom Metadata or Settings. So wanted to ...
Maverick's user avatar
1 vote
1 answer
349 views

Calling AWS Simple Email Service from Apex

I have been trying to integrate the Amazon SES API into my Salesforce project so I can setup a scheduled batch job to send bulk emails. I've created this class to create a signed request to the SES ...
Jake Colledge's user avatar

1
2 3 4 5
7