Questions tagged [namedcredentials]

The tag has no usage guidance.

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

Named Credential connected with XERO it not updating the refresh token

We made a connection between Salesforce and XERO with the help of Named Credentials Oauth2 Authorization. In that, on initial sync, it connected with XERO and it updates the access token in Salesforce ...
4
votes
0answers
44 views

Identity Hash failure when getting keyId

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: ...
0
votes
0answers
33 views

Is there a way to write an external script on devops platform(Azure devops) to update named credentials to original values post sandbox refresh?

To revert named credentials back to original values ,As per documentation we can use Apex Wrapper Salesforce Metadata API for updating Named Credentials post sandbox refresh . But Metadata related ...
0
votes
1answer
54 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? ...
3
votes
0answers
193 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 ...
0
votes
1answer
35 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 ...
0
votes
0answers
13 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 ...
0
votes
0answers
41 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 ...
2
votes
0answers
35 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('...
0
votes
0answers
22 views

Named credential using OpenId Auth Provider

Is it possible to setup Named Credentials for following type of OAuth provider? I tried configuration named credential and Auth Provider (using OpenId) but unable to authenticate successfully. "...
0
votes
1answer
34 views

Automatically Login via SSO Connected App

I'm trying to teach myself IAM areas I'm weak on. I have 2 dev ed orgs.Org A - is the IDP Org B - is the SP I have created the SSO settings in Org B to use Org A as the IDP.In Org A, I have created ...
2
votes
0answers
51 views

JWT Token Exchange setup in Named Credentials for outbound callout

Trying to integrate with okta api from Salesforce that supports JWT Token exchange. I was able to successfully get the access token with the below code but I am blocked on how to use named credentials ...
0
votes
0answers
24 views

External Data Source Named Principal - Will an OAuth 2.0 Auth Provider eventually require another login?

I am setting up an External Data Source to OData, using a Named Credential that is set up as "Microsoft Access Control Service" to call Azure Active Directory. The External Data Source is ...
0
votes
0answers
34 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
21 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
34 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
163 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
43 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
96 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
41 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
40 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
237 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
55 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
174 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
276 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
161 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
99 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
172 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
755 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
128 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
39 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
39 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
34 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
254 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
41 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
539 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
61 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
33 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
227 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
285 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 ...
7
votes
0answers
184 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
151 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
217 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
64 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
47 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
156 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
74 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
332 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
387 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 ...