Questions tagged [namedcredentials]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
39 views

Users need to reauthenticate Per User Oauth2 Integration

I have an AppExchange App which uses OAuth2 Per User Authentication to access a 3rd Party REST API. To configure the app the Admin needs to create an AuthProvider, NamedCredential and a per User ...
0
votes
0answers
20 views

How to upsert attachment using Named credential callout to Rest api endpoint?

I am trying insert/update attachment on a record by making use of Named Credential that I have setup on a different org. I am passing the attachment properties (Name, Body, ParentId, Description) from ...
0
votes
2answers
49 views

Authenticated Lightning Out with another Salesforce Org

Immediate Question: Is there a way to use authenticated Lightning Out with another Salesforce Org? We've currently got two Salesforce Orgs: Org A and Org B In Org A, we've created a flow that allows ...
1
vote
1answer
43 views

How does a Named Credential with a custom Auth. Provider check token validity?

When using a custom OAuth 2.0 provider as an extension of AuthProviderPluginClass for a Named Credential how does Salesforce check whether the current token is valid before attempting to request a new ...
5
votes
0answers
52 views

Manually Invoke Refresh on Custom AuthProviderPluginClass

I have recently implemented a custom auth plugin provider in hopes of getting away from making a token call with every request OR having to manage the token myself. I am using the Oauth 2.0 client ...
2
votes
2answers
67 views

Create NamedCredentials for AWS Signature via Metadata API

I am trying to create the named credentials for AWS using Metadata API. I am getting the following error: System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: '...
2
votes
0answers
44 views

Named Credentials with OAuth getting AUTHENTICATION_FAILURE Message on Save [closed]

Getting Following error when i tried to save Named Credential with OAuth 2.0 Authentication Protocol Named Credentials: { "name": "AUTHENTICATION_FAILURE", "message": &...
1
vote
1answer
51 views

Named Credential Not Working with Bitly Integration [closed]

I have used Named Credential to integrate with Bitly. But getting an error as Forbidden in the logs. Below is my code: public class BitlyService { public String shorten( String url ...
1
vote
0answers
33 views

Is our “Identity Server” a Good Use Case for Named Credentials and if so, how should I use Named Credentials Instead?

We have a collection of microservices hosted on Azure. In order to access these, we must first get a token from what's been described as the "identity server". I can use this code to get the ...
0
votes
1answer
26 views

Managed Package Named Credential password gone

I have a managed package with some apex code that makes a callout to a named credential. The named credential uses a username and password. This gets send in a header in the callout request as an ...
0
votes
0answers
69 views

Error while using client certificate in callouts [duplicate]

I am integrating with an external API which expects client certificate in the request. They had provided .p12 file. I have converted it into .jks and imported in Salesforce. I have tried to use it two ...
1
vote
1answer
51 views

Callout to other Salesforce org using Named Credential - which Authentication option should I use?

I have 2 Salesforce orgs (with identical code) - a hub and a client. I need to pass data from the hub to the client. Using S2S is fine for normal data, but when it comes to files (eg pdf) we can't use ...
2
votes
1answer
136 views

Named Credential authentication with GoToWebinar (OAuth2)

I am trying to connect Salesforce with GoToWebinar (GTW) to automate webinar activities within my Salesforce app. I am attempting to use Named Credentials (OAuth2) to authenticate with GTW. I have ...
0
votes
1answer
39 views

Making a callout To Marketing cloud from Service Cloud External Services

I have been trying to invoke Marketing Cloud Transactional API from Salesforce Service cloud. I saw there is a Marketing Cloud Open API Spec for Transactional Messaging: https://sforce.co/2GuuYMn and ...
0
votes
0answers
30 views

Access Named Credentials with merge fields [duplicate]

I am on a task where I need to call an external webservice that takes the username and password in the request body, not as part of Authorization header. I did setup the username and password using ...
1
vote
1answer
55 views

Calling REST APIs from Lightning

We are currently working on an app where we are calling the Tooling API from our Lightning component Since UserInfo.getSessionId() is not valid in Lightning context, to make the call we are using VF ...
0
votes
0answers
63 views

Named Credential Issue (redirect_uri_mismatch)

We have a fairly complex web service intended only for outside use. We got a last-minute request to use the API internally, and its a lot faster to just call the API than open up the service. Yes, I ...
0
votes
0answers
41 views

Managing per-user Named Credential instances for access to 3rd party apps via an Auth Provider

Context Let's say we have an Auth.Provider with Microsoft Access Control Service in place + a Named Credential set with Per User + OAuth 2.0 and the previous Auth. Provider set. Then I set the proper ...
0
votes
0answers
51 views

External Services - Basic Auth via Named Credential

I added the web service as an 'External Service' based on swagger 2.0 and selected the Named Credential. The web service supports basic auth. However, there is no auth header sent as I would expect ...
3
votes
1answer
175 views

Securely Storing Oauth Credentials for Apex Callouts

I am again trying to understand what is the best possible option to securely making the apex callouts from a trigger to external application which supports OAuth2. I am not building any application/...
1
vote
1answer
226 views

Using Named Credential + OpenID Connect auth provider to obtain access token with client_credentials grant

I am trying to use the Named credentials for the first time without using the named credentials directly if I call the endpoints with credentials it works perfectly fine which uses OAuth where I get ...
0
votes
0answers
60 views

External Services Flow returning null

I've created a flow to utilize an External Service, however, the flow appears to be returning a null object response despite the 200 status code. In addition, the flow doesn't seem to allow me to view ...
3
votes
1answer
58 views

How to use a Named Credential for custom authentication that needs more than username, password to generate a secure token(X-Auth-Token)?

Premise We're currently storing the following parameters used for integration with a home grown web service: username password tokenKey initVector The below code is used to generate an ...
0
votes
0answers
106 views

Auth Provider with per-user Named Credential

I have a custom AuthProviderPluginClass implementation that is working fine for authorization and the related registration handler in my community for External Identity users. I've configured the ...
0
votes
0answers
34 views

Used Named Credentials to Call Web Service in OTHER Domain [duplicate]

I have a named credential for Microsoft Access Control Service, this named credential is Authenticated, so I need the token to call another web service that isn't in the same domain for example the ...
0
votes
1answer
21 views

NamedCredential URL path and Endpoint Callout path is different

I have a requirement to integrate Salesforce with external system, the Endpoint APIs are provided and i am using Named Credentials for making the callouts using Apex: Below is the details for ...
0
votes
0answers
40 views

How to pass Username and password of Named Credentials in HTTP Get [duplicate]

I am trying to send an send a request using get method of HTTP Request and I need to pass the username and password of Named credentials in the URL as username as clientID and password as the client ...
0
votes
1answer
65 views

Using {!$Credential.OAuthToken} in an apex Class

I wrote the code below. HttpRequest req = new HttpRequest(); req.setMethod('GET'); req.setEndpoint('callout:namedCredential/services/apexrest/customRestAPIGetAccount`); req.setHeader('Authorization',...
1
vote
0answers
34 views

Verify if Named Credential is live

Is there a way in Apex to verify if a Named Credential is live, so to speak? Of course, I can hit the endpoint and check the status code, but I'm looking for a more native approach. Specifically, is ...
0
votes
0answers
33 views

How to migrate Named Credential profile access [duplicate]

To authenticate a named credential as a user in the org, ones profile has to have access to the named credential. This is done in the profile setup under the related list "Enabled Named Credential ...
2
votes
0answers
111 views

Salesforce Named Credentials JWT token exchange (outbound) [duplicate]

For server to server integration between two salesforce org. I have used JWT exchange token authentication. I found a difference between JWT created via Apex Auth.JWTBearerTokenExchange and Named ...
0
votes
1answer
39 views

Access to merge fields of Named credentials in apex context

I have to provide OAuth access token to a JS SDK, The JS is uploaded in Static resource and referenced in visualforce JS_SDK.accessToken = '{!my_access_token}'; From Named credential documentation, ...
2
votes
1answer
29 views

Can I use Named Credentials with my SOAP service that requires authentication in the envolope?

My SOAP payload has an authentication node within the payload like this: <CustomInterface> <Header> <Environment>Sandbox</Environment> <Login> <User>...
0
votes
0answers
32 views

Named credential access

I have defined a 'Named Credential' in my org with type Named Principal, which as per https://help.salesforce.com/articleView?id=named_credentials_define.htm&type=5 means 'one user for the whole ...
2
votes
0answers
38 views

Can you put named credential username and password in the endpoint [duplicate]

The short- is there any way to use named credential merge fields in the actual named credential callout's endpoint (in the query string) There is an api that I need to make a callout to in salesforce ...
0
votes
0answers
232 views

Setting up Named Credential for External Rest API with OAuth2.0

I am trying to understand how to set up the Named Credentials & OAuth Provider in Salesforce for calling the External REST API. Before setting this up I tested the call to the REST API through ...
0
votes
0answers
35 views

Used Named Credentials to Call another Web Service [duplicate]

Hello everyone I have a named credential for Microsoft Access Control Service, this named credential is Authenticated, so I need the token to call another web service that isn't in the same domain for ...
2
votes
1answer
92 views

Calling out via Named Credential - API vs Token endpoint

I created Named Credentials to authorize the api and got the token. Now i want to use the same end point to get the weatherdetail. when i tried to access same named credential then its showing error ...
0
votes
1answer
95 views

External Services, Named Credentials, and Google Identity Aware Proxy (IAP)

I have a Swagger/OpenAPI API running on Google App Engine behind Google's Identity Aware Proxy. I can hit the URLs directly, which causes a normal authentication flow and authenticates me using my ...
2
votes
1answer
90 views

Using Named Credentials with client_id and client_secret in url query params

This is more of an instructional post because I spent so long trying to find the answer on here I felt like there should be a more direct post toward people trying to do something similar to what I ...
0
votes
1answer
52 views

Named credentials with POST, url-encoded body and custom grant type for Token generation

Can we use Named credentials against 3rd party with following parameters requirements, which helps us to have access token: Endpoint Method - POST URL encoded body which has following Grant type = ...
1
vote
2answers
101 views

Named Credentials OAuth Sharepoint Microsoft Access Control Service Cust Auth. Provider

I have SalesForce and SharePoint connected on OAuth. I have created Sharepoint app-only, added it to Custom Auth provider and created namedcredentials which is showing as authenticated. Every blog ...
1
vote
1answer
82 views

Can I encrypt namedCredential password (!$Credential.Password) with AES encryption key?

I have requirement to encrypt the password that is stored in Named Credentials when making call out to external system. So I'm planning to use AES256 encryption algorithm from crypto class. But is ...
0
votes
1answer
268 views

Unauthorized Access using Named Credentials [duplicate]

I am using Named Credentials oAuth2.0 protocol to connect with Xero. I have setup Auth. Provider and Named Credential. Named Credential is also authenticated. I have followed the steps mentioned here ...
2
votes
1answer
157 views

Named Credential Authentication [duplicate]

I am trying to connect with Xero using Named Credentials. I am using oAuth2.0 authentication protocol. I have created a Auth. Provider and Named credentials as shown in the image below The Named ...
2
votes
1answer
480 views

Salesforce to Xero integration using Named Credentials by OAuth 2.0

I am trying to do the integration between Salesforce and Xero by using Named Credentials (Authentication Protocol is OAuth 2.0). I created an Auth provider - Then created Named credentials of OAuth 2....
0
votes
0answers
41 views

How do I put an external data source into an unmanaged package with named credentials?

I am packaging an external data source (namely Salesforce Connect: OData 4.0). I'm specifically having trouble implementing named credentials. For authentication, I'm using Named Principal with ...
0
votes
0answers
62 views

REST API Callout with Named Credentials not refreshing token?

I am making a call from my org to the REST API of another org to pull in some data from the chatter feed API. I set up a connected app on the org of the API I am using. It is using the OAuth scopes (...
2
votes
0answers
67 views

Named Credentials: JWT Token Validation

Does Salesforce offer an endpoint for JWT Token introspection OR a public key endpoint? Setup My client wants to secure all calls from Salesforce to their gateway with a JWT Token. Named Credentials ...
0
votes
1answer
111 views

Using Named Credentials with Password Authentication Protocol

I'm trying to make a callout using named Credentials and my Authentication Protocol is Password Authentication. But I'm getting Unauthorized status. I'm not sure if I'm missing any parameter or ...