Action Required: Migrate OAuth User-Agent and Hybrid User-Agent Flows
Find affected integrations in Login History and app configurations, then test PKCE replacements in a sandbox with both flows blocked.
Required action
Migrate every integration that uses the OAuth user-agent flow or the OAuth hybrid user-agent flow before Salesforce enforces their retirement on February 20, 2027.[1] These flows expose access tokens directly to the browser. Salesforce recommends web-server flow variants with PKCE instead.[1]
Who is affected
The change applies to Lightning Experience and Salesforce Classic in all editions.[1][2] An integration is affected if it signs in with any of these Login Subtype values:[2]
- OAuth User-Agent
- OAuth User-Agent for Hybrid Apps
- OAuth User-Agent with ID Token
This covers custom integrations and apps installed from managed packages.[2]
New orgs versus existing integrations
- New orgs: Salesforce blocks both flows in orgs created in Winter ’27, including production orgs, scratch orgs, and sandboxes. In those orgs, the Allow OAuth User-Agent Flows setting on the OAuth and OpenID Connect Settings page is off and can't be turned on.[3]
- Existing orgs: integrations that already use the flows keep working only until enforcement.[2][3] A sandbox refreshed from an existing production org that uses the flow isn't treated as a new org, so the flow also works until enforcement.[3]
What happens if you don't migrate
Integrations still using either flow can't complete authorization and stop working.[2] After enforcement, there is no opt-out, and re-enabling Allow OAuth User-Agent Flows isn't a supported resolution.[2]
Find affected integrations
-
In Setup, open Login History, include the Login Subtype column, and look for entries with any of the three subtypes listed above.[2]
-
Alternatively, run this SOQL query, which returns the application name for logins that used one of those subtypes:[2]
SELECT Application FROM LoginHistory WHERE LoginSubType IN ( 'OAuth User-Agent', 'OAuth User-Agent for Hybrid Apps', 'OAuth User-Agent with ID Token' ) -
Login History shows recent usage. Also review app configurations and deployment documentation so you don't miss an integration that hasn't run recently.[2]
Migrate each integration
Map each integration to its replacement:[2]
| Current flow | Replacement |
|---|---|
| OAuth user-agent flow | OAuth 2.0 web-server flow with PKCE |
| OAuth hybrid user-agent flow | OAuth 2.0 hybrid web-server flow with PKCE |
PKCE is the Proof Key for Code Exchange extension.[1] For an app you didn't develop, such as one installed from a managed package, contact the app developer and confirm that an updated version will be available before enforcement.[1][2]
Mobile apps built with Salesforce Mobile SDK
Starting with Mobile SDK 11.0, OAuth 2.0 Web Server Flow is the default. Update custom mobile apps built with older SDK versions early enough that users can install the update before enforcement. If an app uses Mobile SDK 11.0 or later but opted out of Web Server Flow, switch back to it. Salesforce recommends Mobile SDK 14.0.0; the User-Agent Flow is deprecated in 14.0.0 and removed in Mobile SDK 15.0.0.[2]
Salesforce's own mobile apps, including the Salesforce app, Mobile Publisher, and Field Service, have already migrated to Web Server Flow. Salesforce says users should update them to the latest versions before enforcement.[2]
Test in a sandbox, then deploy
- Apply the replacements from the table above in a sandbox.[2]
- In that sandbox, turn off Allow OAuth User-Agent Flows. This one setting blocks both the user-agent and hybrid user-agent flows.[2]
- Test every affected integration and review failures until all integrations work with the retired flows blocked.[2]
- Copy the tested changes to production.[2]
The release update has been available since late Summer ’26. Setup > Release Updates > OAuth User-Agent and Hybrid User-Agent Flows Retirement lists the guided testing and activation steps.[1][2]
When reviewing test failures, keep the evidence limits in mind:
- Login History shows the status User-Agent Flow Disabled only when the user was already authenticated. Attempts by unauthenticated users aren't recorded, so test each integration directly instead of relying on Login History alone.[2][3]
- The redirect to
/services/oauth2/authorizefails, and what the end user sees depends on how the app handles the authorization error.[2] - With the setting turned off before enforcement, the client receives
invalid_grantwitherror_description: user-agent flow has been disabled by your Salesforce admin. After enforcement, the description changes touser-agent flow has been disabled by Salesforce.[2]
Sources
- OAuth User-Agent and Hybrid User-Agent Flows Retirement (Release Update)https://help.salesforce.com/s/articleView?id=release-notes.rn_security_oauth_useragent.htm&language=en_US&release=264&type=5
- Security Change: OAuth User-Agent Flow Retirement by February 20, 2027https://help.salesforce.com/s/articleView?id=005461282&language=en_US&type=1
- OAuth User-Agent and Hybrid User-Agent Flows Are Blocked in New Orgshttps://help.salesforce.com/s/articleView?id=release-notes.rn_security_user_agent_flow_blocked.htm&language=en_US&release=264&type=5