Salesforce is retiring the OAuth 2.0 Username-Password Flow for Connected Apps. Identify affected integrations and migrate to a supported authentication method before February 20, 2027, to avoid integration failures.
As part of your security readiness activities, identify integrations using the Username-Password Flow and migrate them before the February 20, 2027 enforcement date.
When this update is enforced, integrations using this flow will stop working. Salesforce doesn't offer an extension or exception process for this enforcement date.
Review Setup → Login History for OAuth Username-Password entries.
Review the Release Updates assessment in Setup for the Username-Password Flow retirement update.
Identify affected applications, integration owners, and dependencies.
Test your migration in a sandbox before deploying it to production.
Migrate your existing Connected App to an External Client App (ECA), or create a new ECA configured for your chosen authentication flow.
Migrating to an ECA doesn't automatically change the authentication method. Configure and test a supported flow for your integration.
For more information, see Connected App to External Client App Migration.
Client Credentials Flow
Use OAuth 2.0 Client Credentials Flow for server-to-server integrations when supported by your integration platform. The integration authenticates using the ECA consumer key and consumer secret instead of sending a Salesforce username and password in the token request.
A Salesforce integration user is still required. Configure the integration user's username in the ECA policy's Run As (Username) field. API access is governed by that user's permissions.
See OAuth 2.0 Client Credentials Flow.
Web Server Flow with PKCE
Use OAuth 2.0 Web Server Flow with the Proof Key for Code Exchange (PKCE) extension for interactive, user-facing applications that require end-user authorization.
See OAuth 2.0 Web Server Flow.
JWT Bearer Flow
Use OAuth 2.0 JWT Bearer Flow when the integration must act as a specific user using a signed JWT and certificate. Confirm that the integration platform supports this flow and that it meets your organization's security requirements.
See OAuth 2.0 JWT Bearer Flow.
When Standard OAuth Alternatives Don't Meet Your Requirements
Client Credentials Flow may not be suitable when organizational policy restricts client-secret authentication or when the integration platform cannot securely manage the required credentials. JWT Bearer Flow may not be suitable when certificate-based authentication or signed JWT generation isn't supported by the platform.
In these situations, work with your Salesforce and identity-security teams to evaluate an approved enterprise authentication architecture. Consider the following:
Identity and trust: Which system authenticates the integration, and how is its identity validated?
Token exchange: Does the architecture require an intermediary identity or token service before accessing Salesforce?
Credential protection: How are secrets, private keys, or certificates stored, rotated, and revoked?
Authorization: How is the Salesforce user context established, and how are API permissions controlled?
Operational controls: How are token expiry, renewal, failures, and audit events handled?
For enterprise environments that use a multi-stage token exchange, document the trust relationships and each token request and response. Validate the complete authentication sequence with the relevant identity and Salesforce security teams before selecting the migration approach.
For an ECA using Client Credentials Flow, complete these steps in Setup:
Open External Client App Manager and create a new ECA or open the ECA you intend to use.
Enable OAuth Settings.
Enable Client Credentials Flow.
Set a callback URL. A value is required, although it isn't used by this flow.
Add the Manage user data via APIs (api) OAuth scope.
Save the configuration.
Open the ECA policy settings and set Permitted Users to Admin approved users are pre-authorized.
In Run As (Username), specify the exact username of the integration user.
Save the policy.
Open Manage Consumer Details, verify your identity if prompted, and copy the consumer key and consumer secret.
Store the credentials securely. Don't hardcode the consumer secret in source code.
Verify that the integration user has only the permissions required for the integration.
When migrating from Username-Password Flow to Client Credentials Flow, the token request changes.
| Parameter | Username-Password Flow | Client Credentials Flow |
|---|---|---|
grant_type | password | client_credentials |
client_id | Required | Required |
client_secret | Required | Required |
username | Required | Not sent in the token request |
password | Required | Not sent in the token request |
| Security token | Appended to the password where required | Not required |
| Salesforce user context | Established through the user credentials in the request | Integration user configured in the ECA policy |
Old token request
POST /services/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=password&
client_id=YOUR_CLIENT_ID&
client_secret=YOUR_CLIENT_SECRET&
username=YOUR_USERNAME&
password=YOUR_PASSWORD_AND_SECURITY_TOKEN
New token request
POST /services/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&
client_id=YOUR_CLIENT_ID&
client_secret=YOUR_CLIENT_SECRET
These examples illustrate the request parameters for each flow. URL-encode form values when constructing the actual request.
Configure the ECA and selected authentication flow in a sandbox.
Update the integration to use the new token request or authentication sequence.
Test authentication, API access, effective user permissions, error handling, and token management.
For enterprise token-exchange architectures, validate each authentication and token-exchange step.
Repeat the approved configuration and deployment steps in production.
Confirm that the production integration no longer depends on Username-Password Flow.
Important: February 20, 2027, is the published enforcement date. Complete the migration, security review, and production validation before this date.
| Integration requirement | Recommended option |
|---|---|
| Server-to-server integration that supports client-secret authentication | Client Credentials Flow |
| Interactive, user-facing application | Web Server Flow with PKCE |
| Integration must act as a specific user using a signed JWT and certificate | JWT Bearer Flow |
| Standard flows don't meet organizational security or platform requirements | An approved enterprise authentication architecture, validated with Salesforce and identity-security teams |
005461976

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.