Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
Salesforce OAuth device flow moving from a connected app to a local External Client App
Integration

Salesforce OAuth Device Flow Ends for Connected Apps Nov 30

From 30 November 2026 Salesforce allows the OAuth 2.0 device flow only for local External Client Apps that have a supported callback URL and use no other OAuth flow. This guide shows how to find the affected clients, enable the flow on an ECA, and decide per app whether to migrate, switch flows or retire it.

The short answer

The Restrict the OAuth 2.0 Device Flow to Local External Client Apps release update, enforced 30 November 2026, blocks the device flow for connected apps, packaged ECAs and non-compliant local ECAs. A local ECA keeps it only if no other OAuth flow uses it and its callback is https://localhost, a custom URL scheme, your My Domain, a Setup custom domain or a Salesforce domain.

Key takeaways List the live OAuth apps from Setup > Connected Apps OAuth Usage and a grouped LoginHistory query, matching on both the label and the API name. Retrieve ConnectedApp metadata and grep it for device settings, then check each ECA's callback against the five supported values: https://localhost, a custom URL scheme, your My Domain, a custom domain in Setup, or a Salesforce domain. Give each device-flow client its own local ECA. An ECA that also serves the web server, JWT bearer or any other OAuth flow loses the device flow. Move headless servers, containers and CI jobs to JWT bearer or client credentials, because nobody is there to approve a device code whatever the callback. Test the release update in a full sandbox from Setup > Release Updates, and after 30 November 2026 watch LoginHistory for failed logins against old app names.

The Restrict the OAuth 2.0 Device Flow to Local External Client Apps release update, enforced on 30 November 2026, blocks the device flow for connected apps, packaged External Client Apps, and any local ECA that doesn't meet the new rules. A local ECA keeps the flow only if no other OAuth flow uses it and its callback URL is https://localhost, a custom URL scheme, your My Domain, a custom domain configured in Setup, or a Salesforce domain.

Some clients sign in by showing a user code and waiting for someone to approve it in a browser. Kiosks, warehouse scanners, IoT gateways and command-line tools often work this way. For each of these, check which kind of app it authenticates through, because no setting brings the flow back for a connected app. You need to find those clients, decide which of them should keep the device flow at all, and move each one to a compliant local ECA or to a different flow.

What 30 November actually blocks

The release update became available in late Summer '26 and covers connected apps and External Client Apps (ECAs) in all editions. Salesforce says it is there to protect orgs from illegitimate use of the device flow. Enforcement on 30 November 2026 is automatic: Salesforce blocks device flow requests against any app that misses the criteria. You can review and test the update from Setup > Release Updates.

The device flow is meant for clients with limited input or display, such as smart TVs, appliances and IoT hardware, and Salesforce also allows it for command-line apps. According to the Help article OAuth 2.0 Device Flow for IoT Integration, an app keeps the flow after enforcement only when all three of these hold:

  1. It is a local, org-owned External Client App. Connected apps and packaged ECAs don't qualify.
  2. It isn't used with any other OAuth flow.
  3. Its callback URL is one of the supported values:
    • https://localhost
    • a custom URL scheme
    • your My Domain
    • a custom domain configured in Setup
    • a Salesforce domain

A callback on any other domain, such as a vendor's hosted URL or a container hostname, still fails.

In ECA terminology, local is the opposite of packaged. You create and own a local ECA in your org, and a packaged ECA arrives through a package install. The Help article names packaged ECAs as excluded, so ownership is the test, wherever the client process happens to run.

For ISVs, the migration tool turns a packaged connected app into a packaged ECA, and packaged ECAs can't use the device flow. A packaged product that depends on the flow therefore can't carry it through migration. If that describes your product, plan a flow change.

The second requirement is the one teams miss. I have seen a single ECA reused for a web server login and a device login to avoid creating a second app. That ECA loses the device flow on 30 November even though its callback is compliant.

Does this app keep the device flow after 30 November 2026?

App type Callback URL Also uses other OAuth flows? Device flow after enforcement
Connected app Any Any Blocked. Migrate to a local ECA
Packaged ECA (ISV or 1GP/2GP install) Any Any Blocked
Local ECA https://localhost, custom URL scheme, My Domain, custom domain in Setup, or Salesforce domain No Works
Local ECA Supported value Yes (for example, also web server or JWT bearer) Blocked. Split into a dedicated device-flow ECA
Local ECA Any other URL Any Blocked. Change the callback

The error you see when saving a non-compliant app

Since August 2026, Salesforce won't save changes to an app that has the device flow enabled and fails these criteria. Saving it returns this error, as documented in the IoT Help article:

This app doesn't meet OAuth device flow requirements. The device flow is supported only for local external client apps that you don't use with other OAuth flows. The callback URL must be a supported value: https://localhost, a custom URL scheme, your My Domain, a custom domain configured in Setup, or a Salesforce domain.

To fix it, make the app compliant, or turn off Enable Device Flow in its OAuth settings if nothing relies on the flow.

Find every device-flow client in the org

LoginHistory shows which apps are signing in, and metadata shows which apps have the device flow enabled. LoginHistory does not record which OAuth flow a login used, so you need both.

Which apps are live

Start at Setup > Connected Apps OAuth Usage, which lists every app that has authenticated in the org. Then get volume and failures per user and app from LoginHistory. I run this through sf data query against production:

SELECT UserId, Application, Status, COUNT(Id) attempts
FROM LoginHistory
WHERE LoginTime = LAST_N_DAYS:180
GROUP BY UserId, Application, Status
ORDER BY COUNT(Id) DESC

LoginHistory keeps about six months of data, so a 180-day window covers everything the org still holds and catches clients that only sign in now and then. Application and Status can go in GROUP BY but not in WHERE. You can't write WHERE Application = 'Warehouse Kiosk', so group first and filter the results in memory. Filtering on LoginType narrows the result, but check which values your org actually records before you rely on one. The Software Insights triage filters on LoginType LIKE 'OAuth%', while Salesforce Dictionary's guide to the username-password retirement points at the Remote Access 2.0 login type. The Apex below accepts either.

For a quick pass in anonymous Apex, this adds up successful OAuth logins per app and flags the ones you already suspect:

// Anonymous Apex: successful OAuth logins per app.
// 90 days keeps the query under the row limit.
Set<String> suspects = new Set<String>{
    'Warehouse Kiosk', 'Warehouse_Kiosk',
    'Sensor Gateway', 'Sensor_Gateway'
};
Map<String, Integer> loginsByApp = new Map<String, Integer>();

for (AggregateResult row : [
    SELECT Application, Status, COUNT(Id) total
    FROM LoginHistory
    WHERE LoginTime = LAST_N_DAYS:90
      AND (LoginType = 'Remote Access 2.0' OR LoginType LIKE 'OAuth%')
    GROUP BY Application, Status
]) {
    String app = (String) row.get('Application');
    String status = (String) row.get('Status');
    // Status cannot be used in WHERE, so filter it here
    if (app == null || status != 'Success') {
        continue;
    }
    Integer current = loginsByApp.containsKey(app) ? loginsByApp.get(app) : 0;
    loginsByApp.put(app, current + (Integer) row.get('total'));
}

for (String app : loginsByApp.keySet()) {
    String marker = suspects.contains(app) ? '  <-- check device flow' : '';
    System.debug(app + ': ' + loginsByApp.get(app) + marker);
}

LoginHistory records an app under either its label or its API name, depending on how the app was created, which is why the suspect set holds both forms. An app that looks idle under one name may be busy under the other, and deleting it on that basis breaks whatever still authenticates through it. Every LoginHistory row an aggregate query reads also counts toward the Apex query row limit, so in a busy org run the SOQL through the CLI instead.

Which apps have the device flow switched on

Retrieve the connected app metadata and search it. I match on the word itself so I don't depend on an exact element name:

# Pull every connected app definition into the current DX project
sf project retrieve start --metadata ConnectedApp --target-org prod-admin

# List the definitions that mention the device flow at all
grep -il device force-app/main/default/connectedApps/*.connectedApp-meta.xml

# For one hit, show the device setting and the callback lines together
grep -in -e device -e callback force-app/main/default/connectedApps/Warehouse_Kiosk.connectedApp-meta.xml

For each match, read the device flow setting and the callback URL side by side. For ECAs you already have, check each app's OAuth settings in Setup. A local ECA with the device flow enabled and an unsupported callback, or one also used for another OAuth flow, will also be blocked.

Decide per app: migrate, switch flows, or remove

Put the two lists side by side and each app lands in one of these rows.

What you found What I would do Deadline
Device flow on, in use, a person approves the code on a supported callback Migrate to a dedicated local ECA 30 Nov 2026
Device flow on, in use by a headless server, container or CI job Switch to JWT bearer or client credentials, because no person is there to approve a code, whatever the callback 30 Nov 2026
ECA used for the device flow and for another OAuth flow Split the device flow into its own local ECA 30 Nov 2026
Device flow on, no recent logins Turn the device flow off Now
In use, device flow off Migrate to an ECA Connected app end of support (Summer 2027)
No logins at all Delete the app Now

Most of the work sits in the second row. A build server or scheduled job has no local user to approve a code in a browser, so the device flow was a poor fit for it from the start. Usually someone approved the code once and the job has run on the refresh token ever since, which is already fragile because of refresh tokens that expire after 30 idle days.

For server-side work I default to the JWT bearer flow. The client signs an assertion with a private key and the integration user is pre-authorised, so nobody has to approve anything and no long-lived refresh token sits on the server. The cost is owning the certificate: someone has to rotate the key and know when it expires. Client credentials is quicker to set up and runs as a single execution user, but it puts a client secret on the server that you have to store and rotate. I use client credentials for low-privilege, single-purpose jobs and JWT bearer for anything that touches sensitive data or runs across several orgs. For setup detail, see External Client App scopes and setup for an MCP client and a webhook integration built on the JWT bearer flow.

How to enable the device flow on an External Client App

After 30 November 2026 you can't enable the device flow on a connected app. Enable it on a local External Client App instead. The steps follow the Help article Configure an OAuth 2.0 Device Flow for External Client Apps:

  1. Turn the flow on. In the ECA's global OAuth settings file, set isDeviceFlowEnabled to true and deploy it, or tick Enable Device Flow in the ECA's OAuth settings in Setup.
  2. Set one of the supported callback URLs listed above. For a command-line tool, https://localhost is the usual choice.
  3. Keep the ECA dedicated to the device flow. If another integration needs the web server or JWT bearer flow, create a separate ECA for it.
  4. Copy the consumer key from External Client App Manager > Edit Settings > OAuth Settings > Consumer Key and Secret. Salesforce may ask you to verify your identity first.
  5. Run one device login by hand before you give the key to the device owner.
# Device authorization request
curl -X POST https://<MyDomain>.my.salesforce.com/services/oauth2/token -d 'response_type=device_code&client_id=<consumer key>&scope=api'

# After entering the user code at the verification URL
curl -X POST https://<MyDomain>.my.salesforce.com/services/oauth2/token -d 'grant_type=device&client_id=<consumer key>&code=<device code>'

The first call returns a user code, a verification URL and a device code. The verification URL reflects the My Domain that started the flow, for example https://acme.my.salesforce.com/setup/connect. Open it, sign in and enter the user code, and the second call returns the access token.

Build the real client around the limits in the IoT Help article. The user code is 8 alphanumeric characters, and both codes stay valid for 10 minutes. The first response also carries an interval, the minimum number of seconds between polls. Requested scopes must be a subset of the ones registered on the ECA, and leaving out scope requests every assigned scope. A refresh token comes back only when the app has the refresh_token scope. Don't hard-code the device code's format or length.

Migrating a connected app to an External Client App

The tool is in App Manager: select the connected app and choose "Migrate to External Client App". It handles single-org unpackaged apps, unpackaged apps distributed to other orgs, and apps inside 1GP and 2GP managed packages. For packaged apps, customer OAuth flows, tokens and active sessions stay valid through the package upgrade, so subscribers don't have to reauthorise.

Scope evaluation, IP relaxation and refresh token policy all depend on app configuration, so test them in a sandbox even though the tokens carry over. Before you migrate, use the OAuth Usage page to delete dead apps so you don't carry them forward.

For a device-flow client, the migration is only half the job. Once the ECA exists, enable the device flow and set one of the five supported callback values (see above). If the old connected app also served another OAuth flow, give the device client its own ECA. Then confirm which consumer key the client uses and run a complete device login.

Keep this checklist against the enforcement date:

  • Before 30 November 2026, test the release update in a full sandbox from Setup > Release Updates and note which clients break. Contact third-party device owners early, because a vendor config change can take weeks to ship.
  • From 30 November 2026, Salesforce enforces the update automatically. If a device login suddenly fails against an old consumer key, that app is a connected app or a non-compliant ECA.
  • After enforcement, watch LoginHistory for failed logins against old app names, under both label and API name, and move each of those clients to a compliant local ECA.

The rest of the auth calendar

The device flow change is the first of several dated auth changes. The later rows each have their own post on this site with the detail.

Change Date What to do
Device flow restricted to compliant local ECAs (supported callback, no other OAuth flows) 30 Nov 2026 Migrate or switch flows as above
OAuth username-password flow retirement 20 Feb 2027 Move those integrations to JWT bearer or client credentials
User-agent and hybrid user-agent flows retired 20 Feb 2027 See moving user-agent clients to the web server flow with PKCE
Connected apps reach end of support Summer 2027 See what to migrate before connected apps reach end of support

Once the username-password flow is enforced, integrations still using it start getting authentication errors with no change on their side. If discovery turns up username-password integrations, fix them in the same pass while the inventory is fresh. For every date here, treat Setup > Release Updates in your own org as the source of truth.

What to watch for

  • Match LoginHistory on both label and API name before you call an app unused.
  • A local ECA's callback must be one of the five supported values. My Domain, a custom domain in Setup and Salesforce domains all pass, while a vendor's hosted URL or a container hostname is blocked. Check every ECA, including ones built this year.
  • An ECA used for the device flow and any other OAuth flow loses the device flow. Give the device client its own ECA.
  • Packaged ECAs are excluded, so an ISV can't keep the device flow by migrating a packaged app. Plan a flow change.
  • Migration keeps tokens and sessions, but scope evaluation, IP relaxation and refresh token policy still need a test.
  • Anonymous Apex over LoginHistory can hit the query row limit in large orgs. Use the CLI there.
  • The Salesforce CLI is not affected. sf org login offers web, jwt, sfdx-url and access-token, and current versions have no device option.

Originally reported by help.salesforce.com

Frequently asked questions

What is the Restrict the OAuth 2.0 Device Flow to Local External Client Apps release update?

It is a Salesforce release update that became available in late Summer '26 and is enforced on 30 November 2026. It applies to connected apps and External Client Apps in all editions and blocks the OAuth 2.0 device flow for any app that doesn't meet the new criteria.

Which callback URLs are supported for the Salesforce device flow?

Salesforce supports five values: https://localhost, a custom URL scheme, your My Domain, a custom domain configured in Setup, or a Salesforce domain. A callback on any other domain, such as a vendor's hosted URL or a container hostname, blocks the device flow for that app.

Can a connected app use the OAuth device flow after November 30, 2026?

No. From 30 November 2026 Salesforce blocks the device flow for every connected app, and packaged External Client Apps are excluded too, so an ISV can't keep the flow by migrating a packaged app. Move the client to a local ECA that has a supported callback URL and serves no other OAuth flow.

How do I enable the device flow in Salesforce?

Enable it on a local External Client App: set isDeviceFlowEnabled to true in the ECA's global OAuth settings file, or tick Enable Device Flow in its OAuth settings, and give it a supported callback URL. Keep that ECA out of every other OAuth flow, then test it with a device_code request to /services/oauth2/token.

Why does Salesforce say this app doesn't meet OAuth device flow requirements?

Since August 2026 Salesforce won't save changes to an app that has the device flow enabled and fails the criteria: it is a connected app or packaged ECA, it is also used with another OAuth flow, or its callback URL isn't a supported value. Make the app compliant, or turn off Enable Device Flow in its OAuth settings.

Does the Salesforce OAuth device flow restriction affect the Salesforce CLI?

No. In current versions `sf org login` offers web, jwt, sfdx-url and access-token subcommands, with no device-flow option, so CLI authentication is out of scope for this release update.

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment