Questions tagged [namedcredentials]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 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 ...
1
vote
1answer
19 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 = '...
1
vote
0answers
29 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 ...
0
votes
0answers
37 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 ...
1
vote
1answer
24 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 ...
0
votes
0answers
16 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 ...
0
votes
1answer
62 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:...
2
votes
1answer
46 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 ...
5
votes
0answers
78 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: ...
0
votes
0answers
36 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
208 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
257 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
42 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 ...
1
vote
0answers
62 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
57 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
32 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
45 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 ...
3
votes
0answers
70 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
37 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
38 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
292 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
56 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
121 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
73 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
41 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
503 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
57 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
301 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
478 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
231 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
125 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
258 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
949 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
172 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
46 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
56 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
35 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
314 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
27 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
57 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
757 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
65 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
41 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
355 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
390 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 ...
8
votes
0answers
231 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
190 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: '...