Questions tagged [namedcredentials]
The namedcredentials tag has no usage guidance.
249
questions
2
votes
1
answer
46
views
Einstein Chatbot unable to access Named Credential
We have implemented a REST callout that will need to be used by an Einstein Chatbot, but we are having trouble getting the chatbot access to the named credential used for the callout.
The details:
...
2
votes
0
answers
33
views
Will grant_type=client_credentials now work with Using Basic Authentication with Named Credentials?
Lots of questions over the years about using the grant_type=client_credentials version of oAuth with Named Credentials, and how it isn't really supported. I have a customer who wants to use that ...
1
vote
1
answer
51
views
Using a custom authentication endpoint with an external credential
Following scenario:
We need to set up a connection to an external API. This API uses the resource parameter for authentication, so using a legacy named credential is not possible.
However, the new ...
0
votes
0
answers
31
views
NamedCredentialEncrpytedFieldChange what does it mean
I have an entry in SetupAudittrail which describes there is namedCredentialEncrytpedFieldChange. I wanted to confirm if this is regular entry as part of oAuth process where access and refresh token ...
1
vote
2
answers
81
views
Named credential not accessible by non system admin profiles
I have configured a named credential/external credential to perform an http callout from an apex class.
The named credential :
The External credential :
Everything works fine when I execute the code ...
1
vote
2
answers
88
views
Can External Credentials be used with Lightning Platform licenses?
We're using invocable Apex with Named Credentials and External Credentials to handle authentication. However, it seems that without granting "View All" to the object User External Credential,...
0
votes
1
answer
83
views
Integration with Power BI - authorization via Azure AD / Named Credential
To integrate SF with PowerBI we first need to get an access token from Azure AD with the powerBI scope. I am able to set up a named credential (per user) which connects to Azure AD, I am able to reuse ...
0
votes
0
answers
28
views
How to properly use Named Credentials [duplicate]
I'm trying to configure a named credential for an external service our ORG. What I can't understand is the inner workings of the named credentials.
What I need to do is send some payload to the ...
0
votes
1
answer
89
views
Using Azure as Auth. Provider with Named Credential
I'm building an integration to a service that is protected by Azure OAuth.
I've set up an registered app that I've been able to use to fetch a valid accesstoken to the Service with the following code:
...
0
votes
0
answers
41
views
Setting up per user JWT claim Named Credential
I'm trying to setup a per-user JWT claim as per the documentation here the issue is it specifies
Subject of the token (the user).
The subject is a string when the identity type is named principal, ...
-1
votes
1
answer
179
views
Using named credentials with a custom external API
I am trying to implement named credentials to make callouts from Salesforce to a custom built external API. The external API has a login endpoint that returns a token, and then there are other ...
3
votes
1
answer
139
views
Where to store longer Oauth Access Tokens?
We are implementing a Custom OAuth flow not using NamedCredentials and AuthProviders. For the storage of the Access Token we planned on using a Protected Custom Setting modified by an LWC component (...
2
votes
1
answer
124
views
Get Endpoint/URL of new named credentials
We have developed an app and we are using named credentials (now legacy) to access an external API. Based on the those we also get the URL and build slightly changed iframe srces within the APP.
At ...
0
votes
0
answers
48
views
Create Named Credential from metadataservice class throwing "an AWS access key ID is required for the specified authentication"
I am using metadata service class to create namedcredential via apex code and setting below values
credential.fullName = 'AWS_CONNECT_TEST';
credential.label = 'AWS CONNECT TESTAB1';
credential....
2
votes
0
answers
120
views
Bi-directional communication between External Service and Managed Package
What is the Vanilla approach to establish a bidirectional connection between an External Systema and a Managed Package installed in a Subscriber org?
With Vanilla, I mean:
Package a lot, configure ...
0
votes
0
answers
59
views
Is it possible to use named credential in Platform Event Triggered action (flow in this case)?
I have Platform Event triggered flow, where I have to retrieve data via multiple callouts to external service. Flow runs as autoproc user and I am not able to use named credential to authenticate to ...
0
votes
0
answers
47
views
Named Credential Secret Access Key is Not working in a Managed Package
I have created a named Credential that is perfectly working in my org. But the issue is, when I add these named credential is a managed package it does not work unless I update the 'Secret Access Key' ...
2
votes
1
answer
140
views
Package partially configured NamedCredential and AuthProvider
Creating Auth Providers and Named Credentials for an installed Managed Package is not a simple process. Most Subscriber Admins are overwhelmed by the settings. For that reason, many AppExchange ...
1
vote
0
answers
79
views
Salesforce equivalent of AWS Secrets Manager?
We have Apex code with callouts that use hardcoded credentials. Our organization wants to replace the hardcoded credentials with a secure key store that we can retrieve the credentials from. We are ...
0
votes
1
answer
107
views
Integration between 2 salesforce orgs is being established when provided with wrong credentials
I wonder about the Salesforce orgs connection happening between 2 salesforce environments.
The general norm:
Create a connected app in the target org and generate the consumer key and consumer secret ...
0
votes
0
answers
85
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 ...
1
vote
1
answer
481
views
Unable to access External Credentials from ApexClass
I am trying to have a named credential (with external credential) and make a callout from my unmanaged package's Apex class.
Unfortunately I am getting the following error in the Apex
We couldn't ...
1
vote
0
answers
341
views
Named Credentials error: Request unsuccessful. Incapsula incident
I am trying to go through a OAUTH 2.0 Client Credentials flow.
When I try to hit a token url to get the bearer token using APEX everything goes smoothly. I tried to do the same setting up named ...
5
votes
2
answers
1k
views
External Credential - Unable to use on Digital Experience
I have created a new Named Credential with External Credential (named B2BL_Mulesoft_Integrations) and mapped it to the correct permission sets using the Identity Type as Named Principal.
Can you ...
0
votes
2
answers
287
views
Making an API Callout with Amazon Cognito client credentials authorization
I want to call an API that is authenticated with Amazon Cognito using a client credentials auth flow. I have been provided the client key and client secret. My set up uses SF Auth. Providers and Named ...
0
votes
0
answers
39
views
How to specify the token url for a custom external named credential [duplicate]
I need to make a Oauth 2.0 callout to an external system. Unfortunately it doesn't seem that I can use Auth. Providers as the external system also requires a username and password and there's no way ...
1
vote
1
answer
250
views
AWS S3 - implementing CRUD operations with Named Credentials
How can I perform the following operations in Apex on AWS S3 bucket:
List the contents of the bucket
Add a file to the bucket
Update the file
Delete the file
0
votes
0
answers
52
views
Can't install unmanaged package with Named and Custom External credentials and Permissions set
Can't install an unmanaged package with Named and Custom External credentials with a Permission set.
Permission set provided access to some classes and UserExternalCredentials
Notes:
I have noticed ...
0
votes
1
answer
125
views
AWS S3 DeleteObjects via Named Credentials
I am trying to call AWS S3 DeleteObjects REST API from Apex. I am able to successfully perform this operation in Postman using their Sig4 Auth tool but I am struggling to get this working in Apex.
I ...
1
vote
0
answers
71
views
External Services - Timeout Limit
I am working on an integration where I am using external services and a screen flow to call an external API and display the result to the user. In Apex you can set the timeout of an API call to a ...
0
votes
0
answers
59
views
Flow External Service Sometimes Failing With 401 Error
I'm fairly new to Salesforce Dev so please be patient with me. I've encountered an issue recently in which my External Service will sometimes fail respond with a 401 error.
The External Service was ...
2
votes
0
answers
301
views
Guest User access to External Credentials
I'm trying to make a callout from an unauthenticated experience page using an External Credential but I get this error.
The callout couldn't access the endpoint. You might not have the
required ...
1
vote
0
answers
517
views
Deploy Permission Set Mapping on External Credential
I'm working on a deployment where I am using the new format for Named Credentials with an External Credential. On my external credential, I am using a custom Authentication Protocol with three ...
2
votes
0
answers
156
views
OAuth2 bearer token is not being saved in Named Credential and cannot use {!$Credential.OAuthToken}
I am trying to create an LWC that takes in 2 addresses from the UI and uses Fedex's Rates API to get the estimated cost.
I have the "Token Endpoint URL" but the API docs but it does not ...
-1
votes
1
answer
221
views
Winter 23 Named Credentials: no authentication
Now that Named Credentials have added External Credentials as the extra layer of authentication, is it still possible to have Named Credentials with No Authentication? It would appear that the ...
2
votes
1
answer
285
views
How can I programmatically send users through a Per User Named Credential OAuth flow without directly calling the Metadata API?
I have a named credential configured against the the Microsoft Graph API (https://graph.microsoft.com) with a Per User Identity Type, an OAuth 2.0 Authentication Protocol, and a configured ...
1
vote
1
answer
849
views
Problem setting up Named Credential for REST callouts
I want to do Apex REST callouts to a JSON web service. I've got a "Client-Id" and "Client-Secret", and they need to be sent in the HTTP header for authentication throughout, along ...
0
votes
0
answers
31
views
How to get Authentication Status Named Credentials Object from Apex
Is there any way to access to the value of the 'Authentication Status' field within Named Credentials from Apex or SOQL?
1
vote
0
answers
32
views
How to mock/repoint urls to external services of already released managed package to different testing envs (e.g. qa/staging/uat heroku apps)
Our managed package uses a lot of external services in a form of nodejs heroku applications.
Integrations are implemented in different ways:
apex callout + named credentials
canvas connected app
...
1
vote
0
answers
211
views
Authorize Oauth in Named Credentials via Apex Code
Bit of an outlier type question here, but we have an Apex application that needs to access 50 or so peoples Google Calendar, and we have tested it with Named Credentials and OAuth 2, and it works ...
0
votes
0
answers
284
views
AWS Named Credential in Salesforce Error (Endpoint needs to be in full URL form)
I have an AWS account and two Orgs. I want to link an AWS account to Salesforce with Named Credentials. One Org is of 240 branch and the other is a Sandbox Org that is owned by a customer. I used the '...
0
votes
0
answers
130
views
How do you map an object in an external service action in Flow?
I'm trying to make a post to an external system. I've set up the named credential and created an external service with the proper schema. The endpoint needs to receive the input parameters as a JSON ...
1
vote
0
answers
51
views
"Nested" Named Credential Callout
I have a named credential, let's call it NC1, setup for a custom AWS endpoint. This works great using the endpoint and an access key. However, as part of the body of NC1, I need to send an auth ...
1
vote
0
answers
474
views
Named Credentials with JWT Token Exchange: problem with "subject_token"
I was trying to setup a Named Credentials with JWT Token Exchange (i.e. not the basic "JWT" option) to use GCP Identity Federation and I got this error when doing an APEX Http callout:
...
5
votes
1
answer
207
views
External Service in a Managed Package Doesn't Work in Subscriber Orgs
I'm developing an api integration feature from Salesforce to an external web service in a managed package using External Service, Named Credential and Flow.
The feature works in a packaging org but ...
0
votes
0
answers
435
views
Using username and password properties from named credentials to create an access token for x-authorization header
I'm using named credentials to make a callout, I'm not using the Generate Authorization Header since the authorization uses an x-authentication header.
I have tried this:
aeroplanCallout....
0
votes
0
answers
101
views
Open ID Connect Auth. Provider - obtaining the cookies
My requirement is to access external (non-SF) system, which has additional authentication layer in Microsoft Azure AD.
When using curl or Postman in general, I'm performing 3 requests:
Oauth 2.0 : ...
1
vote
1
answer
876
views
Named Credential with OAuth Authentication Provider does not refresh access token
This is an extremely annoying unsolved issue that I see more people than I have been, and are(?), struggling with without a solution to date. Please help! Workaround or guidance.
Auth Provider (AP): ...
1
vote
0
answers
304
views
Is There Workaround for Using a Bearer Token as Authentication for Declarative Named Credential?
My OpenApi 3.0 schema requires just a bearer token as authentication. Salesforce declarative Named Credential does not offer this as option. When using Password Authentication with a dummy username I ...
1
vote
2
answers
553
views
Named Credential - using a merge field
Im facing issues trying to generate the auth header in Apex when using Named Credentials.
Unfortunately I cannot use the standard Named Credential approach (auto header generation) as I have to embed ...