Salesforce Refresh Tokens Now Expire After 30 Idle Days: Find the Integrations That Break Next
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.
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.
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.
2. Find the integrations at risk
- 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.
- Record each integration's OAuth flow. Client Credentials and JWT Bearer are safe. Anything that stores a refresh token goes on the review list.
- 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".
- Check the vendors. DocuSign, Nintex and CData have all published guidance on the 30-day limit; ask the rest how their connector behaves.
- Prove it in a sandbox. Revoke a refresh token, confirm the job fails the way you expect, and confirm your re-authorization runbook works.
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.
Predict the Outcome
Five scenarios you'll meet in the first months of the idle limit.
Cheat sheet: is this integration at risk?
| OAuth flow | Holds a refresh token? | Idle-limit risk |
|---|---|---|
| Client Credentials | No | None |
| JWT Bearer | No | None |
| Web Server (with PKCE) | Yes | High if any gap reaches 30 days |
| Device flow | Yes | High, plus local External Client Apps only from Nov 30, 2026 |
| User-agent and hybrid user-agent | Yes | High, 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.
Official Resources
Straight from Salesforce: the docs this article is based on.
Trailhead
Developer Docs
Want a list of every integration the idle limit will break?
We'll audit your OAuth apps and schedules, and plan the fixes.
All information in this article was collected from publicly available resources, including official Salesforce documentation.