Questions tagged [jwt]

The tag has no usage guidance.

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

Create static resource file from managed package

I have a managed package in which I'm using Metadata API to create a Static Resource file on the user's Salesforce org. Code snippet to create Static Resource file, MetadataService.MetadataPort ...
  • 23
0 votes
0 answers
39 views

Manually set or change header properties in JWT

I am running into an issue in developing for JWT Server -> Server workflow. I can use the JWT class to set properties in the Payload of the JWT with methods like setSub, setAud etc. However, when I ...
0 votes
0 answers
35 views

oAuth JWT flow for multiple users

I've only ever used the JWT flow for server to server integrations with a hardcoded specific user. Is it even recommended to use it with multiple users where we dynamically inject the username into ...
1 vote
1 answer
73 views

Why has pipeline JWT auth started erroring with 'Value is not a JsonMap'?

The GitLab pipeline was running successfully until a few days ago. Nothing has been changed as far as we're aware, but it now fails on the authentication step with "We encountered a JSON web ...
  • 965
0 votes
1 answer
30 views

How can I resolve ampscript variables in the @json payload when using GetJWTByKeyName ampscript function?

I want to configure a script that will dynamically populate variables in the @json payload of the GetJWTByKeyName ampscript function, based on the user data. I know the blow script isn't valid, but ...
  • 15
2 votes
0 answers
51 views

Connected App Using Server To Server JWT OAuth Can Only Have One Session At A Time

I have a connected app that I authenticate to from multiple servers using the same IP in my data center. (This Salesforce org is setup to only allow IPs in the allowlist - which ours is in.) The first ...
  • 121
0 votes
1 answer
37 views

Connect to Doordash API From Salesforce Apex - JWT Help

I keep getting 401 status code returned, but using Postman it works fine, so I think I am missing something in the JWT Creation. There are not a lot of examples I can find, so hoping one of the ...
0 votes
0 answers
123 views

How do I import a JKS where I do not have the private key

The public cert is issued by the claims provider. It is for custom apex JWT verification. I get an error when uploading: "Error: No certificate was imported because the keystore file doesn't ...
  • 1
1 vote
1 answer
83 views

Salesforce CDP Ingestion API: 401 Invalid JWT Token Format Error

I'm trying to implement the OAuth 2.0 JWT Bearer flow for CDP Ingestion API Connected App. Below are the steps and here's the help doc reference - https://help.salesforce.com/s/articleView?language=...
0 votes
1 answer
291 views

ECONNRESET when authenticating via sfdx auth:jwt:grant

I have configured below pre-requisites for JWT based authentication to Salesforce sandbox. ConnectedApp server.key Client Id I am trying to authenticate Salesforce sandbox from client's Jenkins ...
0 votes
1 answer
366 views

Apex REST API call throws 401 error, status: token expired or invalid [closed]

I am trying to call external REST API from Salesforce. Sometimes I get error 401 with messages token expired or token invalid. Is there a way to prevent calling API when token is not valid. The thing ...
0 votes
1 answer
225 views

Validate String JWT using Apex [closed]

I have generated JWT token. I added it as String argument in one method I have to call. Is there a way to validate that String token if it is expired, valid, etc?
2 votes
1 answer
77 views

How often does Salesforce change the keys at https://login.salesforce.com/id/keys?

How often does Salesforce change the keys change at https://login.salesforce.com/id/keys ? Context A client wants to verify the JWT signature generated for Salesforce's OpenID Connect token However, ...
  • 2,092
0 votes
0 answers
32 views

Web app and two Salesforce orgs working as IDP and SP

Currently we have two Salesforce orgs, one of them is IDP, and second SP. Community Users login to Org 1 and use community resources on Org 2. Now we would like to create external WebApp. Between Web ...
  • 335
0 votes
0 answers
278 views

Named Credentials JWT created with invalid signature using Microsoft as Auth Provider

We need to make an authenticated call to an external endpoint with Named Credentials created on Salesforce using a Microsoft account with Oauth 2.0. To do that, we created an Azure project in order to ...
0 votes
0 answers
59 views

Where i can see jwt token passed or not to end points in journey builder custom activity

Where I can see jwt token passed or not to end points in journey builder custom activity, JWT not included in payload for Custom Activity endpoints
0 votes
1 answer
31 views

Multiple digital signatures against one app

Is it possible to set up multiple valid Digital Signatures against one app? as stated in the title? When we get to cert expiry dates converting the changeover is such a pain it would be nice if I ...
1 vote
0 answers
60 views

We have recently migrated to govcloud+ and no longer able to authenticate to scratch org using jwt from devhub as part of our CI

Below is our auth approach into scrath orgs to allow us to login and serve them as part of a "scratch-org-pool-service". export SFDX_AUDIENCE_URL="https://test.salesforce.com" echo ...
0 votes
0 answers
355 views

JWT - loading a private key from Certificates and Key Management

I am trying to use JWT and I am getting error at jws.getCompactSerialization(); What am I missing. BOXJWT is Selfsign certificate. Map<String, String> extraClaims= new Map<String,String>();...
  • 1,459
0 votes
0 answers
245 views

How do i get certificate's public key to validate JWT token in client app (Generated via NamedCredential)

For our setup, We are making outbound call from customer's salesforce to our external service. For authentication, we are using NamedCredential using JWT. To validate this JWT token on the external ...
  • 101
0 votes
0 answers
327 views

JWT Authentication Flow debug and how to call from Postman (for debugging)

There's an existing Salesforce org with a Community Site. There's an error when user logs in and after which I believe it hands off to Angular for further user experience. In Salesforce logs I see the ...
0 votes
0 answers
55 views

Generate JWT for calling out to Snowflake [duplicate]

Trying to create a custom integration from Salesforce to Snowflake and they provide a python snippet, which can be seen here, that is able to generate a jwt to gain authorization. I'm trying to ...
  • 358
2 votes
1 answer
365 views

Named credential JWT is not appearing in Authorization header in callout

I've configured a Named Credential to use the JWT authentication protocol (not JWT Token Exchange), but when the component makes a call to my service using the named credential, I don't get the JWT as ...
  • 73
2 votes
1 answer
503 views

error in node JS and SF integration via jsforce using JWT

Premise: I need to integrate SF with NodeJs using JWT. I'm following Salesforce Developers Session for this purpose. As of now the entire setup of NodeJs is only in local. According to the video I ...
  • 427
0 votes
1 answer
367 views

Send JWT token with External Data Source for Odata v4 endpoint in header

I am trying to Authenticate the Calls to My Odatav4 , In My Service I have started accepting JWT token in header and it is working if i call the service in postman with JWT token in header, Now in my ...
0 votes
1 answer
184 views

Username/password JWT with Salesforce Named Credentials

I need to integrate with a service that uses an authentication flow I'm not familiar with and wondering can I use Named Credentials with it? The flow requires that I first get a JWT token by passing a ...
  • 325
1 vote
1 answer
181 views

Access token doesn't change with JWT flow

I have a connected app to use the JWT flow and I generate the access token with sfdx force:auth:jwt:grant command. I noticed that the obtained token is always the same even after a day. I would expect ...
  • 177
0 votes
0 answers
195 views

invalid_grant invalid assertion POST /services/oauth2/token

I followed up this guide and I believe I did it correctly. However I'm receiving this error from POSTMAN POST /services/oauth2/token HTTP/1.1 User-Agent: PostmanRuntime/7.28.4 Accept: */* Postman-...
2 votes
0 answers
193 views

Does APEX language support ES256 algorithm?

I'm trying to implement social login via Apple. When requesting an access token, I get an "invalid_client" error. I found that one cause for this issue is a bad-formatted JWT, which is ...
2 votes
2 answers
235 views

SF required multi-factor authentications starting February 2022 OAuth JWT Bearer Token flow

I am using JWT flow described bellow https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5 and SF required multi-factor authentications starting February 2022 ...
-2 votes
1 answer
224 views

Salesforce to an external Service callout using JWT [closed]

Hi Community Members, The ask is to call a service, from Salesforce that will accept only requests that are based on JWT. Precise wording is Salesforce sends an encrypted JWT object containing the ...
-2 votes
1 answer
511 views

Redirecting to an external page using JWT

I am required to redirect a user to an external payment gateway, from a visualforce page. Apart from just the redirection, sensitive information is to be passed to the external gateways, and using JWT....
0 votes
1 answer
200 views

Salesforce oAuth JWT Integration

We have provided salesforce self signed certificate to external system for oAuth JWT integration with salesforce. when they hit salesforce they get the below error What does this error mean and how to ...
  • 7,655
0 votes
1 answer
955 views

{"error":"invalid_grant","error_description":"invalid assertion"} I want to send post request to Salesforce [closed]

I am trying to send post request to salesforce for Oauth by using JWT and I wrote it like the one below, but I got an error that says {"error":"invalid_grant","...
  • 19
1 vote
0 answers
156 views

JWT authentication parameter error

I am currently working on the project that I am going to integrate the application of my company and salesforce. In my case, it seemed that using the JWT for authentication is better. So, I wanted to ...
  • 19
1 vote
1 answer
372 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 ...
2 votes
2 answers
533 views

SessionID access vulnerability found when using Metadata API

Salesforce is performing manual security review in our package. They have found SessionID access Vulnerability in one of our file where we are using Metadata API to grant permissions on profile and ...
  • 5,734
0 votes
0 answers
133 views

Community SSO using JWT

We are setting up a Salesforce Community and our community members should be able to automatically login from 3rd party and at their end they will create the JWT payload and via connected app ...
  • 652
1 vote
1 answer
223 views

OAuth2.0 JWT bearer token flow with alg HS256 issue

I have written the below python code for JWT integration: from datetime import datetime import jwt import time import requests # *** Update these values to match your configuration *** IS_SANDBOX = ...
2 votes
1 answer
199 views

OAuth JWT Bearer Flow and Managed Packages

Does anyone know if the Certificate uploaded to a Connected App in my Dev org will be installed automatically to all customers through a Managed Package? Right now I have a small analytics app that I ...
  • 17
3 votes
1 answer
3k views

Error authenticating with JWT config due to: audience is invalid

I've created a connected app based on this Trailhead project. Note that this isn't about a trailhead project I'm using what I've learned from Trailhead in a real-world project to implement CI/CD for ...
  • 662
1 vote
0 answers
128 views

Pass JWT Token (ID Token) when calling external System using Salesforce Connect

We are working on a Integration to get data from an external system using Salesforce Connect. The high level flow is Salesforce (Connect) -> APIGEE -> Legacy System For Authentication - We are ...
0 votes
1 answer
322 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 ...
5 votes
0 answers
309 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 ...
  • 341
0 votes
0 answers
193 views

Access REST API with Connected-App and JWT Bearer Token Flow

I read this article and created php demo script. https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5 Environment: Sandbox OAuth Scopes: api, refresh_token, ...
  • 1
0 votes
0 answers
321 views

Using Named Credentials with an endpoint running on my machine

I am trying to generate a JSON Web Token(JWT) via named credentials as per user. I want to use this named creds for authentication purpose. So that using them after salesforce providing JSON web token,...
1 vote
1 answer
2k views

How to generate signed JWT token in Apex using JWK keyset

How to generate signed JWT token in Apex using JWK keyset. I know Auth.JWS can be used to generate bearer token. JWS(jwt, certDevName) but it uses certificate to generate token. My requrement is ...
  • 11
0 votes
1 answer
354 views

Generate a JWT with Apex to call a web service from another system [duplicate]

I develop an Apex class wich calls an web service from another system. I need to use a JWT to make the authentication but I never used it, so I don't know how to do it. I read the Salesforce ...
  • 663
0 votes
0 answers
121 views

How to access JWT in registration handler using Auth provider (open id)

In our org we have an open Id auth provider setup that works fine along with the registration handler. The only issue is we are receiving only the email currently from the provider in the auth....
2 votes
1 answer
1k views

Allow external users to access customer community SSO/JWT

Use Case: Coming from the client website, the external users need to be log into their customer communities account without having to log again. I know that I could use SAML for this use case, but ...
  • 233