Salesforce Is Retiring the Username-Password OAuth Flow on February 20, 2027: The Migration Runbook
Somewhere in your org there's an integration that logs in with a username, a password and a security token pasted into a config file years ago. On February 20, 2027 it stops getting access tokens. This isn't a deprecation warning you can snooze: it's a release update with a fixed enforcement date for every org.
In this runbook you'll find every integration that still uses the flow, use the Migration Path Finder to pick the right replacement for each one, copy working token requests, and test the cut-over in a sandbox before the date arrives.
grant_type=password1. What exactly is retiring, and when
The OAuth 2.0 username-password flow lets an app swap a user's username, password and (usually) security token for an access token in one call. Salesforce announced its retirement in Spring '26 and first targeted Winter '27, then moved enforcement to February 20, 2027, around the Spring '27 release. The change ships as a release update called Retirement of OAuth 2.0 Username-Password Flow for Connected Apps; you'll find it under Setup > Release Updates.
- New orgs are already blocked. Orgs created in Summer '26 or later block the flow, and if the release update doesn't appear in your org, Salesforce indicates that your org already blocks it.
- It fails at the next token request. Integrations break when they ask for a new access token after enforcement, so a cached session can make the failure show up hours or days later, often overnight in a batch job.
- The error is generic. Expect
invalid_grantwith "authentication failure", and Login History entries with the status "OAuth Username-Password Flow Disabled". - Moving to an External Client App alone won't save you. External Client Apps don't support the username-password flow at all, so you must change the flow, not just the app type.
login() is a different mechanism, so it isn't covered by this release update. But it's on its own path out: Salesforce is retiring SOAP API login() in the Summer '27 release, it remains available only in API version 64.0 and earlier, and it's disabled by default in orgs created in Winter '26 or later. If you're touching an integration anyway, migrate both.
2. Find every integration that still uses it
Start with Login History. It's the fastest evidence you have, but treat it as a lead list rather than a complete inventory.
- From Setup, open Login History and click Create New View. Name it something like "OAuth Username-Password".
- Add a filter: Login Subtype equals OAuth Username-Password.
- Add Login Subtype, Username, Application and Source IP to the columns, and save.
- Group the results by user and application. Each distinct pair is an integration to migrate.
- Mind the gaps. Login History keeps about six months of data and a custom view shows up to 20,000 records. A quarterly or annual job can be missing, so no rows doesn't prove you're safe.
- Cross-check the vendors. NetSuite, Genesys, Medallia and Oracle Integration have all published migration notices for their Salesforce connectors. Ask every vendor with a Salesforce connector which flow they use.
- Look for integration users with passwords that never expire. That's often the tell.
The Migration Path Finder
Answer three questions about one integration. You'll get the replacement flow, why it fits, and the setup checklist.
The Token Request, Rewritten
Switch tabs to compare the request that stops working with its replacements. Placeholders are in capitals.
3. Set up the replacement
Client Credentials (most server-to-server integrations)
- Create an External Client App and enable OAuth with the
apiscope (addrefresh_tokenonly if the client needs it). - Under flow enablement, select Enable Client Credentials Flow.
- In the app's policies, set the Run As user. Every API call runs with that user's permissions, so use a dedicated integration user with the Salesforce Integration user license and only the permission sets the job needs.
- Copy the consumer key and secret into your secrets manager, never into source control.
- Point the client at your My Domain token endpoint:
https://MYDOMAIN.my.salesforce.com/services/oauth2/token.
JWT Bearer (certificate-based, acts as a named user)
- Generate a private key and an X.509 certificate. The certificate goes into Salesforce; the private key never leaves your server.
- In the External Client App, upload the certificate and enable the JWT bearer flow. Users must be pre-approved through the app's policies, because nobody clicks "Allow".
- Sign a short-lived JWT with
iss(consumer key),sub(username),aud(login.salesforce.com, test.salesforce.com or your My Domain) andexp, then post it as the assertion. - For the Salesforce CLI and CI pipelines, use sf org login jwt, and set
sfdcLoginUrlto your My Domain login URL if it isn't the default.
Web Server flow with PKCE (a person signs in)
If the integration genuinely acts for individual people, such as a desktop tool or a customer portal, let each user authorize it once in the browser. The app then keeps a refresh token per user. That's the only replacement that preserves per-person audit trails without storing anyone's password.
4. Test it before Salesforce does
- In a full or partial sandbox, go to Setup > OAuth and OpenID Connect Settings and turn off Allow OAuth Username-Password Flows. That simulates enforcement.
- Run every integration on your list, including the monthly and quarterly ones. Anything still on the old flow returns
invalid_grant. - Cut each integration over to its new flow and rerun. Check the records it writes show the right Created By user.
- In production, use the release update's test run to switch enforcement on early, during a window you control. Keep the old credentials for a fast rollback until the test run is clean.
- After cut-over, reset the old integration user's password, so nothing quietly keeps using it.
Predict the Outcome
Five scenarios from real migration projects.
Cheat sheet: which flow replaces it
| Integration | Use | Secret you manage | Runs as |
|---|---|---|---|
| Middleware, ETL, scheduled jobs | Client Credentials | Consumer key + secret | The app's Run As user |
| CI/CD, CLI, services that must act as a specific user | JWT Bearer | Private key (certificate in Salesforce) | The user in the sub claim |
| Apps where each person signs in | Web Server + PKCE | Per-user refresh tokens | Each signed-in user |
| Vendor connectors | Whatever the vendor supports | Per vendor | Check their migration notice |
Dates and behaviour checked against Salesforce documentation and release information in November 2026. Confirm the release update's status in your own org.
Official Resources
Straight from Salesforce: the docs this article is based on.
Trailhead
Developer Docs
Not sure how many integrations still use passwords?
Our architects can audit your org and plan a migration before February 20, 2027.
All information in this article was collected from publicly available resources, including official Salesforce documentation.