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 a different token each time. I'm missing something?

1 Answer 1


Access tokens are tied to a session in Salesforce. If you use the access token frequently enough1, then the session can stay active effectively forever (and you won't get a new access token).

Session timeout is controlled by the connected app. If no timeout is defined at the connected app level, then the timeout defined on the target user's profile is used. If no timeout is defined at the profile level, the timeout defined at the org level is used.

1: Salesforce checks for activity in a session after 1/2 of the configured timeout has elapsed. If you perform any action, then the session timeout will be reset. I.e. If your timeout is 4 hours, your session started at 15:00, and you make a request at 18:00, then your new session timeout would be 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .