Questions tagged [namedcredentials]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
38 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
19 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 ...
-2
votes
0answers
33 views

Use of Credential Class in Named Credential

Please let me know "{!$Credential.UserName}" and "{!$Credential.Password}" will return named credential username and password or it will return salesforce username and password I ...
0
votes
0answers
22 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
45 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
99 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
125 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
43 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
53 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
67 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
32 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
18 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
38 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
46 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
30 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
32 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
51 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
33 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
26 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
29 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
35 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
103 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
33 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 ...
1
vote
1answer
67 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
70 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 ...
1
vote
1answer
63 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
45 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
86 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
69 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
193 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
118 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
374 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
37 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
46 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
54 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
70 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 ...
0
votes
0answers
33 views

Status=Unauthorized, Code=401 using Named Credential from Apex

I have a REST Integration between two Salesforce Orgs and have set up a Connected Application in Org A and an auth provider and named credential in Org B. The named credential shows as authenticated -...
0
votes
1answer
87 views

OAuth Named Credential Callout Issue

Defined an Named credential to get the access token and status of the named credential is 'Authenticated' but when I do call the Apex call out it doesn't return success response. I am not sure what I ...
5
votes
1answer
177 views

“Decryption Exception” errors on Named Credential

I have callouts that use a Named Credential and a Custom Oauth2 Auth Provider fail with this error response: Invalid parameter value "[hidden]" for parameter "Decryption Exception" A similar ...
3
votes
1answer
403 views

Accessing AWS S3 via a REST API (Apex callout with a Named Credential)

I am trying to make a callout to AWS S3 using named credentials and Apex The named credential is set up as follows Label: AWS S3 Name: AWS_S3 URL: https://bucket-name.s3.amazonaws.com - Certificate: ...
1
vote
1answer
129 views

JWT works in developer console but does not working in APEX code

In Salesforce when I use a JWT Named Credential from developer console it is successful but running from the same APEX code from a Visual Force Page or Lightning Component it is not successful. I am ...
0
votes
0answers
237 views

AWS Signature Version 4 Named Credential doesn't seems like working

I have requirement to fetch a file from s3 server to Salesforce. As a part of Summer'19 release, Salesforce has provided AWS Signature Version 4 protocol in Named credential.From below link I see that ...
0
votes
0answers
47 views

Auth Provider for Trello?

I've spent too many hours today trying to set up an Auth Provider + Named Credential for Trello's auth flow... I guess my question is, for those who have dealt with Auth Providers in SFDC, is this ...
0
votes
1answer
46 views

IP restrictions when authenticating named credentials

I'm trying to create a named credential for accessing in-house services from salesforce. For that I've setup an authentication provider: type: Open ID Connect Authorize Endpoint URL: https://test....
1
vote
0answers
45 views

OAuth Flow required every day. Otherwise Callout fails with 401

In a customer org, Api calls are made using a NamedCredential using an OpenIdConnect AuthProvider. I didn't configure this but my own code fails with 401 Unauthorized. When I going to the ...
12
votes
2answers
322 views

Initiate an oAuth flow via an Auth Provider

I use the Metadata API and the Apex wrapper to create an AuthProvider and NamedCredential after the installation of my managed package app. MetadataService.NamedCredential cred = new MetadataService....
3
votes
1answer
614 views

Using Named Credentials in OAuth 2 authentication (grant_type=password)

I want to get an access token from an external endpoint (HTTP callout to REST API) without hardcoding passwords. The external system expects a request with Oauth 2.0 authentication details provided in ...
4
votes
2answers
512 views

sfdx force:source:pull -> Entity of type 'AuthProvider' named '' cannot be found

I am trying to do a sfdx force:source:pull from a scratch org where I defined and authenticated a Named Credential and Auth Provider (OAuth2 Named Principal). I get: • RetrieveFailed - Entity of ...
2
votes
2answers
79 views

How can i mass update NamedCredentials?

I need to update endpoint for 50 records on NamedCredential object. I tried different scenarios but nothing seems to be working.. 1 - Endpoint is not allowed to filter in SOQL and NamedCredential is ...
5
votes
1answer
942 views

AWS Signature Version 4 Using Named Credentials [duplicate]

Anyone tried Summer '19 Named Credentials using AWS Signature Version 4 successfully? Trying again to use External Services and first step is the Credentials. I created an IAM user with the ...