NexBlazers Logo
NexBlazers Learn • Build • Grow
Security & Identity

Salesforce Refresh Tokens Now Expire After 30 Idle Days: Find the Integrations That Break Next

Written by NexBlazers Architecture Team November 24, 2026 11 min read Interactive

The integrations that break first won't be the busy ones. They'll be the quarter-end reconciliation, the annual renewal export and the "monthly" job that nobody has looked at since go-live. Since November 4, 2026, Salesforce has been rolling out a 30-day idle limit on refresh tokens across production orgs.

In this post you'll learn exactly what changed, run your own schedule through the Idle Token Simulator to see which runs fail, and pick the fix that stops the 2 a.m. re-authorization calls for good.

Oct 21, 2026
Sandboxes
30-day idle limit rollout begins
Nov 4, 2026
Production
Rolling, with no per-org date announced
Nov 30, 2026
Device flow
Restricted to local External Client Apps

1. What changed

The Winter '27 release note Refresh Token Idle TTL Is Limited to 30 Days applies the setting Limit Idle Refresh Token Time-to-Live (TTL) to 30 Days to Connected Apps and External Client Apps. Salesforce invalidates any refresh token that goes unused for 30 days. Every successful use resets the clock.

  • The rollout is gradual. Sandboxes started on October 21, 2026 and production, scratch and Developer Edition orgs on November 4, 2026. Salesforce doesn't announce the exact date for each org.
  • "Valid until revoked" no longer means forever. Your app's refresh token policy still applies, but with the idle limit on, a token that sits unused for 30 days dies whatever that policy says.
  • The failure is quiet until it isn't. The next run gets invalid_grant ("expired access/refresh token"), and the integration stays down until a person signs in again.
  • Mobile counts too. Salesforce told Field Service customers that devices must connect at least once every 30 days to stay signed in, and set January 18, 2027 as the deadline to update to app version 264.1 or later.

Who is affected, and who isn't

Only flows that keep a refresh token are exposed: the web server flow (with or without PKCE), the user-agent flows and the device flow. Client Credentials and JWT Bearer integrations mint a fresh access token on every run and never hold a refresh token, so the idle limit doesn't touch them.

Architecture Note: this is one of four changes landing together Salesforce is tightening OAuth on several fronts at once. The device flow is restricted to local External Client Apps with localhost callbacks from November 30, 2026. The user-agent and hybrid user-agent flows retire on February 20, 2027, alongside the username-password flow. And Connected App support ends in Summer '27. Plan one migration that covers all four.
Try it

The Idle Token Simulator

Pick how often an integration runs and what you'll do about it. The calendar runs it through 2027 and shows every run that would need someone to re-authorize.

How often does it run?
What will you do about it?
0Runs in 2027
0Re-auths needed
0Exactly 30 days
All runs OK A gap of exactly 30 days (too close to rely on) A run fails with invalid_grant

2. Find the integrations at risk

  1. List every app that issues refresh tokens. Check App Manager, the External Client App Manager and the Connected Apps OAuth Usage page, which shows each app's users and token use.
  2. Record each integration's OAuth flow. Client Credentials and JWT Bearer are safe. Anything that stores a refresh token goes on the review list.
  3. Record the run frequency. Use job schedules and Login History, and flag any integration with gaps of 30 days or more: monthly, quarterly, annual and "on demand".
  4. Check the vendors. DocuSign, Nintex and CData have all published guidance on the 30-day limit; ask the rest how their connector behaves.
  5. Prove it in a sandbox. Revoke a refresh token, confirm the job fails the way you expect, and confirm your re-authorization runbook works.
Architecture Note: "monthly" is the dangerous word A job on the 1st of every month has a 31-day gap after January, March, May, July, August, October and December. Under a 30-day idle limit, that's seven failures a year from a schedule that looks safe. Try "Monthly, on the 1st" in the simulator.

3. Fix it properly

Option A: remove the refresh token (best for machines)

If no person needs to be in the loop, move the integration to Client Credentials or JWT Bearer on an External Client App. Each run gets a brand-new access token, so there's no idle clock at all. That's also the direction the username-password retirement pushes you.

Option B: keep the token warm (when a person must authorize)

If the integration must act as a real user, schedule a lightweight keep-alive that exchanges the refresh token well inside 30 days, weekly for example. Salesforce's own guidance is to run a refresh before the limit to get a new refresh token with a further 30-day life.

# keep_alive.py: run weekly from your scheduler (Python 3, requests)
import os, requests

resp = requests.post(
    "https://MYDOMAIN.my.salesforce.com/services/oauth2/token",
    data={
        "grant_type": "refresh_token",
        "client_id": os.environ["SF_CONSUMER_KEY"],
        "client_secret": os.environ["SF_CONSUMER_SECRET"],  # confidential clients only
        "refresh_token": load_refresh_token(),
    },
    timeout=30,
)
if resp.status_code != 200:
    alert_on_call(resp.text)  # e.g. invalid_grant: page a human NOW, not on run day
else:
    body = resp.json()
    # With Refresh Token Rotation on, Salesforce returns a NEW refresh token.
    if "refresh_token" in body:
        save_refresh_token(body["refresh_token"])
  • Store the new token every time. With Refresh Token Rotation on, each refresh invalidates the old token and returns a new one. Once enabled, rotation can't be turned off.
  • Avoid parallel refreshes. Salesforce warns clients to handle race conditions: two workers refreshing the same rotated token at once can lock each other out. Funnel refreshes through one place.
  • Alert on the keep-alive itself. Its whole value is telling you about a dead token weeks before the real job runs.

Option C: accept it, with a runbook

For a genuinely annual task, it can be fine to re-authorize on the day. Write down who does it, how, and which credential they use, and alert before the run instead of after it fails.

Interview-ready

Predict the Outcome

Five scenarios you'll meet in the first months of the idle limit.

Question 1 of 5 Score: 0

Cheat sheet: is this integration at risk?

OAuth flowHolds a refresh token?Idle-limit risk
Client CredentialsNoNone
JWT BearerNoNone
Web Server (with PKCE)YesHigh if any gap reaches 30 days
Device flowYesHigh, plus local External Client Apps only from Nov 30, 2026
User-agent and hybrid user-agentYesHigh, and retiring on Feb 20, 2027

Checked against Salesforce release notes, the ISV security guide and published partner notices in November 2026. Salesforce rolls the limit out org by org, so assume yours is already enforced.

Keep learning

Official Resources

Straight from Salesforce: the docs this article is based on.

Want a list of every integration the idle limit will break?

We'll audit your OAuth apps and schedules, and plan the fixes.

Book an Integration Audit

All information in this article was collected from publicly available resources, including official Salesforce documentation.