Skip to main content

All Questions

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

Passing Autherization Token from Apex to Salesforce External Services method

I am using External services for integration. I've created Named Credentials, External Named Credentials, External Services Utilized Custom API. In 1st method call I'll be getting Authentication token ...
Hari Enaganti's user avatar
0 votes
0 answers
50 views

Callout exception - OAuth token error

I am trying to call an API that requires Client credentials flow for token generation. I have configured external credentials and also configured named credentials using the external credentials ...
Mahmood's user avatar
  • 6,006
0 votes
0 answers
239 views

Named Credential - Refresh access token when not 401?

I'm trying to connect to an external system using legacy Named Credential and a custom Auth. Provider (with AuthProviderPlugin class). I'm able successfully call the endpoints when the access token is ...
sfdcnewbie's user avatar
0 votes
0 answers
149 views

Google Cloud Connection Works with Apex Auth Class but not with Named Credentials

I have hosted an API on google cloud run and the downloaded the service account credentials in below format. { "type": "service_account", "project_id": "...
aloomatar's user avatar
0 votes
0 answers
26 views

Execute Sync report api not giving correct result

We are using named credentials to call execute sync api(POST) call (https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_getreportrundata.htm). ...
Manuj Pandey's user avatar
1 vote
1 answer
931 views

Named Credential - Status: Unauthorized; Status Code = 401 - Working with Bearer Token but not with Callout

I have a Legacy Named Credential from UAT that I am porting over to PROD. To test the Named Credential, I am running an Apex Snippet in PROD but I am getting a 401 error. See below: However, when I ...
choco_butter's user avatar
1 vote
0 answers
407 views

Dynamically selecting external credentials with Named Credentials

We have a button that integrates with an external system using Named Credentials. We are using per-user authentication here and every user authenticates themselves with their external system username ...
salesforcets's user avatar
1 vote
0 answers
289 views

How to Configure Named Credentials in Salesforce for External Callouts Using Client ID and Client Secret?

I'm in the process of integrating Salesforce with an external service. In our scenario, an LWC page calls a method in its Apex controller. This method then initiates an external callout to obtain a ...
Akif's user avatar
  • 25
0 votes
1 answer
1k views

External Credential's 'Principal' not allowing multiple parameters

I'm trying to use Named Credential to authenticate to an external API. I'm storing the credentials(token and api-key) under 'Principals' in External Credential. But I noticed that when I'm adding ...
Akshay_SFDC's user avatar
0 votes
1 answer
1k views

Using Azure as Auth. Provider with Named Credential

I'm building an integration to a service that is protected by Azure OAuth. I've set up an registered app that I've been able to use to fetch a valid accesstoken to the Service with the following code: ...
Cnork's user avatar
  • 91
0 votes
1 answer
2k views

Using named credentials with a custom external API

I am trying to implement named credentials to make callouts from Salesforce to a custom built external API. The external API has a login endpoint that returns a token, and then there are other ...
CloudHugger's user avatar
  • 1,793
0 votes
1 answer
240 views

Integration between 2 salesforce orgs is being established when provided with wrong credentials

I wonder about the Salesforce orgs connection happening between 2 salesforce environments. The general norm: Create a connected app in the target org and generate the consumer key and consumer secret ...
Rahul Allada's user avatar
0 votes
0 answers
583 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 ...
user2943892's user avatar
3 votes
1 answer
383 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 ...
Sarang's user avatar
  • 2,665
0 votes
1 answer
761 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 ...
Patlatus's user avatar
  • 17.8k
1 vote
0 answers
193 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 ...
yash rohan singh's user avatar
1 vote
1 answer
148 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 ...
Robert Sösemann's user avatar
4 votes
1 answer
830 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 ...
LVS's user avatar
  • 1,791
2 votes
1 answer
5k 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 ...
mtbclimber's user avatar
0 votes
0 answers
44 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 ...
Rahul Khanchandani's user avatar
2 votes
0 answers
387 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 ...
Apex Ranger's user avatar
2 votes
0 answers
274 views

How can I update a User Record from a custom AuthProviderPlugin's getUserInfo() method?

I am trying to integrate Salesforce with Jira using a Named Credential and oAuth 2.0. The Named Credential requires a Custom Auth. Provider which requires an AuthProviderPluginClass. The ...
Jeff Bennett's user avatar
3 votes
1 answer
4k views

What fields deploy with NamedCredential?

I have a callout where we use a Named Credential and it looks something like the following: public class MyClass { public MyClass() { inputHttpHeaders_x = new Map<String, String>...
Adrian Larson's user avatar
  • 151k
26 votes
2 answers
9k views

Where to Store Token Auth?

Problem Statement I am working on an integration that will authenticate with a token. I need to pass it via header as follows: "Authorization": "Token abcdefghijklmnopqrstuvwxyz" I also need to ...
Adrian Larson's user avatar
  • 151k
2 votes
0 answers
315 views

How can I leverage Named Credentials?

I am doing a POC for a point to point integration between Salesforce & SAP. I have to make callouts to SAP's SOAP services. The SAP team has provided me a WSDL file, the body block of WSDL expects ...
Jarvis's user avatar
  • 2,110
0 votes
1 answer
571 views

OAuth Named Credential Callout Failure

I have created a named credential that points to the Microsoft graph API. My credential has been authenticated successfully but when I try to use it from Apex it fails. I am unable to debug , The ...
cloudy-ritz's user avatar
  • 2,593
9 votes
3 answers
2k views

Session expired or invalid

I am trying to build Salesforce to Salesforce integration using Named Credentials. Followed steps from below blog. http://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-...
sfdc's user avatar
  • 13.8k
3 votes
1 answer
3k views

Salesforce to Salesforce integration using Named Credentials

I am trying to build Salesforce to Salesforce integration using Named Credentials. Followed the steps from below blog. http://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-...
sfdc's user avatar
  • 13.8k