Questions tagged [namedcredentials]

The tag has no usage guidance.

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

Named Credentials: Need to re authenticate after every 7 days for Google API [closed]

I have integrated Google calendar API via Apex. And to authenticate, we are using named credentials. Now, this named credential stays authenticated when using a Google account linked to a google ...
1 vote
1 answer
73 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
16 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
1 vote
0 answers
22 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 ...
  • 2,813
1 vote
0 answers
71 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 ...
  • 21
0 votes
0 answers
112 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
40 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
35 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 ...
  • 317
1 vote
0 answers
157 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: ...
  • 111
3 votes
1 answer
87 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
89 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....
  • 252
0 votes
0 answers
44 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 : ...
  • 53
1 vote
1 answer
358 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): ...
  • 11
1 vote
0 answers
94 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,454
1 vote
2 answers
199 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 ...
  • 13
0 votes
1 answer
365 views

How to debug Named Credential Refresh Token Issue

I am implementing an integration with a third party that uses OAuth 2. I am using a 'Named Principal' Named Credential with an Open ID Connect Auth Provider. It works fine to authenticate and make ...
  • 11.1k
0 votes
1 answer
157 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 ...
1 vote
1 answer
372 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'; ...
0 votes
0 answers
163 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 ...
0 votes
0 answers
283 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==>...
  • 31
1 vote
0 answers
68 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 ...
0 votes
0 answers
213 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 ...
0 votes
1 answer
81 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 ...
  • 63.8k
0 votes
1 answer
339 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, ...
1 vote
0 answers
311 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,...
0 votes
0 answers
145 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 ...
  • 101
0 votes
0 answers
134 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" ...
1 vote
1 answer
726 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 ...
  • 63.8k
1 vote
1 answer
42 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 ...
  • 343
0 votes
0 answers
655 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 ...
0 votes
1 answer
454 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 ...
2 votes
1 answer
325 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 ...
  • 73
0 votes
1 answer
179 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 ...
  • 1,431
1 vote
0 answers
341 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 ...
  • 11
0 votes
1 answer
385 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 ...
5 votes
0 answers
67 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 ...
-1 votes
1 answer
573 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": [ {...
  • 294
0 votes
0 answers
259 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 ...
2 votes
1 answer
530 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: ...
0 votes
1 answer
126 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 ...
  • 275
0 votes
2 answers
702 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?
  • 23
2 votes
0 answers
100 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 ...
0 votes
1 answer
66 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)....
0 votes
1 answer
418 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 ...
1 vote
0 answers
70 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 -> ...
-1 votes
2 answers
202 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 ...
0 votes
0 answers
25 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 ...
0 votes
1 answer
232 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 ...
  • 1
0 votes
0 answers
204 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 ...
  • 1
2 votes
1 answer
777 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 ...

1
2 3 4 5