Questions tagged [namedcredentials]

The tag has no usage guidance.

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

Import Mulesoft APIs with External Services - 301 Moved Permanently Response

I have been following the instructions provided in the official salesforce developer docs here regarding importing mulesoft apis using sfdc external services for use in a flow. I have followed the ...
user avatar
1 vote
1 answer
43 views

Named Credential Permission Error - How to enable named credentials with "Named Principal"

I've got a new named credential setup using an OIDC auth provider and the named principal type. It's authenticated successfully but when I try to call it I get String namedCredential = 'callout:asdf'; ...
user avatar
0 votes
0 answers
51 views

Calling an API hosted by MS Azure

On the Azure Portal console we have registered an application through the App Registration page. The app has a client credential with 1 secret. We have created a custom scope, called custom.scope. We ...
user avatar
0 votes
0 answers
43 views

Named credentials are not able to see in profile

I need to add a named credential for one of the profile .But after i look into profile named credential access I can't see any available name credential in org at profile, I navigate Profile==>...
user avatar
  • 1
1 vote
0 answers
26 views

Named Credential Invalid Hostname

I am trying to use named credentials as one of my endpoints has an underscore but I am running into this error: FATAL_ERROR System.CalloutException: Invalid characters in hostname Here is my actual ...
user avatar
0 votes
0 answers
45 views

Named Credentials JWT created with invalid signature using Microsoft as Auth Provider

We need to make an authenticated call to an external endpoint with Named Credentials created on Salesforce using a Microsoft account with Oauth 2.0. To do that, we created an Azure project in order to ...
user avatar
0 votes
1 answer
20 views

HttpCallout.InvalidNamedCredentialException: Named Credential: xxx not configured in Salesforce

I'm testing an Apex callout using Named Credentials and getting this error HttpCallout.InvalidNamedCredentialException: Named Credential: hipaaorder_staging not configured in Salesforce But the ...
user avatar
  • 61.4k
0 votes
1 answer
65 views

Callout using External Services: Error 401: Unauthorized

The scenario is that want to send a simple JSON-message to a URI without any authentication. I want to achieve this without using code, so I am trying to use a combination of named credentials, ...
user avatar
0 votes
0 answers
53 views

Setup the Name Credential and Auth Provider for Marketing Cloud API

We are intent to use Marketing Cloud API using Apex Callout. Initially, I was trying to set up a Name Credential and Auth Provider for the Server-Server API Package on the MC side. But with my testing,...
user avatar
0 votes
0 answers
38 views

How do i get certificate's public key to validate JWT token in client app (Generated via NamedCredential)

For our setup, We are making outbound call from customer's salesforce to our external service. For authentication, we are using NamedCredential using JWT. To validate this JWT token on the external ...
user avatar
  • 101
0 votes
0 answers
44 views

named credentials merge fields

So I implemented a custom Auth for Client Credentials flow using example from "https://lekkimworld.com/2021/05/07/custom-salesforce-auth-provider-for-microsoft-azure-client_credentials-flow" ...
user avatar
1 vote
1 answer
226 views

Apex callout Unable to tunnel through proxy. 403 forbidden. Using Named Credentials; works fine in curl

Given: Apex Callout (POST) to an in-house REST service Named credentials Authorization headers are correct URL is correct Verified working using curl When: Invoked using execute anonymous or ...
user avatar
  • 61.4k
1 vote
1 answer
31 views

Salesforce Connect OData v4 needs a cookie from /Login endpoint before talking to data endpoints

Here's a rundown of my Salesforce Connect setup: FIRST I was able to set up a Named Credential, using password authentication API Name: MyAPI URL: https://myapi:50000/b1/v2 SECOND I then created an ...
user avatar
  • 293
0 votes
0 answers
148 views

How to use Named Credentials in a Basic Auth callout with API key?

This initial code works perfectly to do a Callout with UN, PW and API key in Custom Settings. But this is less secure and so I want to move teh UN & PW to Named Credentials. but it fails. This ...
user avatar
0 votes
1 answer
135 views

Importing certificates: "Keystore contains a certificate with an alias that conflicts with a certificate already in the organization."

I'm trying to deploy changes that include Named Credentials from one sandbox to another. In order to do that, all the certificates used by my Named Credentials need to be in the target sandbox at the ...
user avatar
2 votes
1 answer
231 views

Named credential JWT is not appearing in Authorization header in callout

I've configured a Named Credential to use the JWT authentication protocol (not JWT Token Exchange), but when the component makes a call to my service using the named credential, I don't get the JWT as ...
user avatar
  • 73
0 votes
1 answer
70 views

Salesforce BOX integration with Named Credentials

I am actually trying to use Named Credentials with Auth provider to connect Box API, however when I am trying to authenticate with the box I am stuck. It is taking me to the Salesforce page instead of ...
user avatar
  • 1,393
1 vote
0 answers
161 views

Salesforce Marketing cloud rest API from Salesforce Cloud (apex)

I'm trying do set Auth. Providers and Named Credential for the salesforce marketing cloud in order to be able to make callout from apex without worrying to get and refresh the token. Is there any ...
user avatar
  • 11
0 votes
1 answer
142 views

Custom auth provider - how to get a new access token without a refresh token

I have to integrate Salesforce with an external app using OAuth2.0. I create Auth. Provider and Named Credential, authenticated successfully too. But I'm getting one issue with Named Credential : The ...
user avatar
4 votes
0 answers
51 views

Merging fields into Named Credentials for use with External Services and Flow

I have an external REST API with an OpenAPI definition that I'd like to call from Salesforce via External Services + Flow. The external REST service needs a lot of extra stuff in the header for ...
user avatar
-1 votes
1 answer
371 views

Move files from one folder to another using Google Drive API and Apex [closed]

I’m making a callout using named credentials and trying to update the parent Id of the G-Drive file. While doing the callout, getting the below error. "error": { "errors": [ {...
user avatar
  • 294
0 votes
0 answers
86 views

Named Credentials with Authorization Protocol OAuth 2.0 vs authorization and authentication handled using apex

Could anyone please clarify my doubts. If I use Authentication Protocol as Oauth 2.0 and provide an Authentication Provider for the same with required settings and call a rest end point of different ...
user avatar
2 votes
1 answer
257 views

How do you you use Named Credentials in LWC?

How do you use named credentials where a LWC makes the callout? I have an apex controller where I'm getting the path and the user creds and passing it to LWC, and getting the error below in Chrome: ...
user avatar
0 votes
1 answer
60 views

Username/password JWT with Salesforce Named Credentials

I need to integrate with a service that uses an authentication flow I'm not familiar with and wondering can I use Named Credentials with it? The flow requires that I first get a JWT token by passing a ...
user avatar
  • 245
0 votes
2 answers
219 views

Named Credentials using password authentication

I need to call the same org using named credential password authentication,. Can anyone explain if i need to pass a api for the password where could I get that api for same salesforce org?
user avatar
  • 23
2 votes
0 answers
51 views

Force Named Credential to get a new access token using Apex

I'm using a Named Credential with OAuth2 to call a SOAP API. This API returns an HTTP 500 after the token is expired, but a Named Credential can only automatically refresh the access token when a 401 ...
user avatar
0 votes
1 answer
38 views

How to add nonce & state to OpenID based Named Credential

I'm working on an integration using a named credential with an OpenID auth. provider. I'm getting a nonce_is_missing response when running the authentication flow (during save of the named credential)....
user avatar
0 votes
1 answer
225 views

Payment Gateway Authentication

I am trying to setup B2B Commerce Payments to use a Cyber Source Payment Gateway that I have already implemented but am having issues with the authentication. The Cyber Source API that my Payment ...
user avatar
0 votes
0 answers
44 views

How can i create ExternalDataUserAuth for Google integration

I have created Named credentials with Identity type per User and OAuth 2.0 Protocol. Everything works fine if I go step by step in the Settings -> Authentication Settings for External Systems -> ...
user avatar
-1 votes
2 answers
99 views

Best Practices for Storing API Key?

I have a Lightning Web Component that makes a fetch() request straight from the component's JavaScript. For testing and development I've simply stored the API key as a variable, but I'd like to back ...
user avatar
0 votes
0 answers
24 views

Named credential now working when deployed to production org via package [duplicate]

When testing in the scratch org environments everything goes fine, but after creating a package and installing it in a environment that is close to production, callouts are not working, and the ...
user avatar
0 votes
1 answer
85 views

Calling Tooling API via Named Credential and refresh tokens

I am using Named Credential to call Tooling API. I'm seeing this warning on Named Credential and keep losing access to it. Keep getting Invalid Session Id error every few hours. "The ...
user avatar
  • 1
0 votes
0 answers
113 views

How to set up Named Credentials for NiCE inContact Central API?

As the title says, I'm trying to figure out how to set up a Named Credential for the inContact API. I've been searching for specific documentation or examples, but no luck yet. I've currently got the ...
user avatar
  • 1
2 votes
1 answer
338 views

oAuth: implementing Client Credentials flow for calling out to a 3rd party API

GOAL: Retrieve an access token from a 3rd party service so as to make a call with this token to 3rd party API. This is the quote from the doc. The ExternalApp API is accessible using an Oauth2 JWT ...
user avatar
0 votes
1 answer
1k views

Should Named Credentials be used to store an API Callout Bearer Token?

Problem I have a straightforward REST API callout in apex. request.setEndpoint('https://api.websitename.com'); request.setMethod('GET'); request.setHeader('Authorization','Bearer ...
user avatar
  • 601
0 votes
0 answers
76 views

Named Credential Authentication Error

I am trying to connect with Named Credentials. I am using oAuth2.0 authentication protocol. I have created a connected app ,Auth Provider and Named credentials as shown in the image below Error, the ...
user avatar
  • 13
1 vote
1 answer
48 views

Basic GET request not working with name credential

I have a GET request I want to manage but Authorization Header is not working if I retrieve username and password from Named Credential. String username = '{!$Credential.UserName}'; String password = '...
user avatar
  • 771
1 vote
0 answers
62 views

Setting up Auth Provider with SSO

I am calling a REST API using Auth provider and Named credential, but the client wants to use their IDP SSO instead of using API credentials. Is there a way we can configure an SSO with Auth Provider ...
user avatar
1 vote
0 answers
82 views

How to find out 'Authentication Status' of specific Named Credential for current user?

Is there any way we can query for and check the Authentication Status of a Named Credential for the current logged in user? I found we can query for Named Credential sObject, as well as ...
user avatar
  • 5,596
1 vote
1 answer
229 views

Using JWT As authentication Protocol in Named Credentials for External Service

As a part of my project work, I need to connect to Azure Logic App via External Service in Salesforce. I know the prerequisite is to create Named Credentials first. I have chosen following in setting ...
user avatar
0 votes
0 answers
18 views

Org-level authentication towards an external service via Resource Owner Password Flow [duplicate]

Named credentials are a very useful tool to protect company-wide and personal credentials and as far as I know, Salesforce offers first class support to interpolate them in headers and body. I have to ...
user avatar
  • 1,612
1 vote
1 answer
305 views

Error 404 when using named credentials

I am actually using named credentials to do a callout to another salesforce instance. The following code works well in my sandbox : HttpRequest req = new HttpRequest(); req.setEndpoint('callout:...
user avatar
  • 2,393
2 votes
1 answer
95 views

How to use Named credentials with a 2 step password and access token authentication system?

The third party system that I am trying to connect to has following authentication mechanism: Step 1: We have been provided with a X-Api-User and X-Api-Secret to be included in header. Other header ...
user avatar
  • 2,450
5 votes
0 answers
85 views

Identity Hash failure when getting keyId [closed]

I'm receiving this error below, but it starts coincidentally after applying the update Summer'21. IdentityHash failure when getting keyId: 02G1H0000005AOD of type CREDENTIAL for Context Org: ...
user avatar
0 votes
1 answer
692 views

System.CalloutException: The URI is invalid

I'm doing a simple HTTP callout in Apex using a Named Credential with Username/Password authentication, but I'm getting a System.CalloutException: The URI is invalid. What could be the cause here? ...
user avatar
  • 796
3 votes
0 answers
283 views

Faced the issue with creating/editing Named Credentials [closed]

Let's say there is need to create new or edit existing Named Credentials entry. But every time I get an error like 'Something went wrong getting your credentials. Try again, or contact Salesforce ...
user avatar
  • 687
0 votes
1 answer
69 views

Is this better to store system-defined credentials in a middleware layer or in custom settings?

For an outbound integration from Salesforce to External System, is this better to store system-defined credentials in a middleware layer or in Custom Settings or in Static Resource? Is this secure to ...
user avatar
  • 13.2k
0 votes
0 answers
23 views

Access Named Credential using C#

Is it possible to access the Named Credential using C#? We have an integration with the other system where the external system will be consuming our custom API and someone from our team suggest to use ...
user avatar
2 votes
1 answer
245 views

SFDX - CI - Named Credentials and environments

We have a repository with metadata in source format, and we use sfdx and ci job to deploy, some metadata (Named Credentials for this instance) contains some values that are env/org dependant. For the ...
user avatar
2 votes
0 answers
125 views

AWS S3 callout fails with x-amz headers

I have to use canned ACL header 'x-amz-acl' as described in AWS S3 documentation Callout with Named Credentials without header works fine HttpRequest request = new HttpRequest(); request.setEndpoint('...
user avatar

1
2 3 4 5