We use a third party provider for SSO using OpenId Connect. We use the accessToken for the logged in user when making API calls for user session validation.

When we do an Auth.AuthToken.getAccessToken() call, does Salesforce save the token locally or does it go to the auth provider every time we call Auth.AuthToken.getAccessToken()?

I'm trying to minimize the number of accessToken calls to my authProvider as we are hitting their rate limit.

Thanks in advance for your comments/answers.

1 Answer 1


I found the answer, Auth.AuthToken.getAccessToken() goes to the auth provider only once to get the access token, however when we make a refreshAccessToken call, Salesforce goes to the auth provider and the accessToken is updated. On subsequent getAccessToken() calls, Salesforce returns the existing access token.

You must log in to answer this question.

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