Questions tagged [namedcredentials]

The tag has no usage guidance.

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

Salesforce to Azure AD named credential failing after access token expires

Sf azure:Refresh token exchange to renew access token process (not working) I am facing an issue where I have a named credential configured in Salesforce using auth provider (using openid connect for ...
0
votes
0answers
20 views

Use of Named-Credentials for storing Access Token of multiple users [duplicate]

We have an AppExchange App which needs to fetch data from an external application via API Calls. OAuth is setup in the external application. API calls need to happen in the context of individual user ...
0
votes
0answers
32 views

Using Named Credentials Instead Custom Settings [duplicate]

For integration with Box I have process where I make callout to Box and get token in return. Currently the settings are stored in metadata and I'm checking if I can use instead Named Credentials. But ...
1
vote
2answers
75 views

How to create Named Principal Named Credentials, for Salesforce itself, as an Identity User

The background to this is that we have Apex code using the Pardot API. Soon, the authentication for that will need to use a Salesforce session id. So, we created a Connected App, Auth. Provider, and ...
0
votes
0answers
28 views

Create a Named Credential programmatically

Salesforce newbie here. I've successfully created a Named Credential manually in my local scratch org. Now, I'm having a hard time to create the same Named Credential programmatically. Does anyone can ...
0
votes
1answer
80 views

Marketing Cloud Transactional Message API: scope_mismatch error when using refresh and offline_access scopes

I am integrating with the Marketing Cloud Transactional Message API: Transactional Messaging API I am setting up a Named Credential in Salesforce to connect to the Marketing Cloud API, and I have ...
0
votes
1answer
24 views

Named Credential auto-generate aws sig4 not working for s3 'versions'

Main issue: I get a signature mismatch error (403 forbidden) when trying to hit the REST api for s3 using the versions action (ListObjectVersions). It seems to me that this may be an error with how ...
0
votes
0answers
38 views

Named Credentials redirects to login page after successful callout

I have implemented Named Credential to integrate b/w Sales and Service orgs with the guidance from this website (Salesforce to Salesforce integration) and able to successfully integrate the orgs. ...
0
votes
2answers
83 views

Named Credential shows Authentication Status Pending even after successful authentication

I am trying to setup oAuth between salesforce and Workday. I created a Auth provider and a named credential as shown in the screenshots. Named credential] Auth Provider I checked 'Start ...
0
votes
0answers
53 views

Include API key as a URL query parameter via a Named Credential [duplicate]

HttpRequest req = new HttpRequest(); req.setEndpoint('callout:Google/maps/api/place/findplacefromtext/json?'); req.setHeader('key', '{!$Credential.Password}'); req.setMethod('GET'); ...
0
votes
1answer
99 views

Named credentials returning Unauthorized, 401

I have setup a connected App, Auth. provider and Named credential to call an Apexrest in a same Salesforce org but I am continuously getting Unauthorized 401. Surprisingly, it is working in a ...
1
vote
1answer
152 views

Using Named Credentials to send API key in Authorization header

I'm trying to make use of Salesforce Named Credentials to securely store the API Key and call endpoint accordingly. I tried to pass a custom API Key to an endpoint as below. HttpRequest req = new ...
1
vote
0answers
107 views

How to access a Named Credential as a Guest User?

I want a Site Guest User to be able to hit a page that uses Apex to do an API call. However, if I create a Named Credential of type 'Named Principal', then that credential is simply missing from the ...
0
votes
1answer
80 views

How can I write a post install script in apex that creates named credentials?

I would like to understand: If we can write a post install script to create a named credential that is required to be able to view a certain report in the managed package(the report feature that I am ...
0
votes
1answer
109 views

Build pre-signed AWS S3 URLs with Named Credentials [duplicate]

I'm building an integration with S3 and I want to create a pre-signed URL so I can access S3 from SF with a single user. I use the method below to generate a URL: public static string getSignedURL(...
10
votes
1answer
591 views

Custom REST controller to access Auth.AuthToken.getAccessToken returning null

Following on from a previous question: How to access OAuth Token stored in NamedCredential using Apex for use in other third party application I've created a custom REST endpoint which proxies ...
1
vote
1answer
98 views

How to access OAuth Token stored in NamedCredential using Apex for use in other third party application

I'd like to use the native Salesforce Auth. Provider and Named Credential capabilities to allow a Salesforce user to follow the OAuth flow to authenticate against a 3rd party service, and then later ...
0
votes
0answers
33 views

Per User Authentication for External Service

As part of my use case, I need to integrate different external sources from Salesforce . All the authentication has to be per-user and this whole thing needs to be part of managed package. Now the few ...
0
votes
0answers
33 views

Named Credentials and REST Callout for an API that provides me with a token [duplicate]

Writing an Apex class to make REST Callouts to several API endpoints (Jira, Tempo, and Zendesk). Methods on the class will be invoked daily by the Apex Job Scheduler. Jira was easy to setup using ...
0
votes
0answers
33 views

Custom Merge Field Named Credential Apex

I am integrating with GoToWebinar using a Named Credential to make Apex Callouts. While the Authentication piece is working well, during the Callback to get the access token, there are some additional ...
3
votes
1answer
205 views

Why can't we package custom AuthProvider in Managed Package

My Managed Package app connects to an external REST API. This API uses OAuth2. For easy connectivity, I planned on packaging a custom AuthProvider with all the app-specific settings like URLs and ...
0
votes
0answers
23 views

How to write to ExternalDataUserAuth programatically? [duplicate]

Is it possible to write records to the ExternalDataUserAuth object via Apex code? When I try to write some Apex code to insert records into the ExternalDataUserAuth object I get an 'illegal dml object'...
1
vote
0answers
39 views

Does Declarative Amazon Signatue Version 4 Named Credential Work At All With External Services and Flow

Can anyone confirm if they have EVER used declarative AWS Signature Version 4 as a Named Credential with External Services and Flow in Salesforce for ANY reason? Not Apex Classes to set these. A ...
1
vote
2answers
338 views

Per User Named Credential and External Identity Users [duplicate]

My question is almost similar to one mentioned in 'Auth Provider with per-user Named Credential' (Auth Provider with per-user Named Credential). I am trying to authenticate and make a API call when a ...
1
vote
1answer
58 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
29 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
169 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
201 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 ...
6
votes
0answers
131 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
110 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
147 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
61 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
41 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
117 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
72 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
224 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
291 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
79 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
40 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
60 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
213 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
92 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
90 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
422 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
607 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
123 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
66 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
325 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
35 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
27 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 ...