An Apex test changes a user’s role, queries AccountShare for rows with RowCause = 'Rule', and asserts that one exists. It has passed for years. Tick one checkbox in Sharing Settings and it fails, because from Spring ‘27 that sharing recalculation can finish after your transaction does.
That’s the change in the Salesforce Spring ‘27 release most likely to break code that compiles and deploys without complaint. Salesforce hasn’t published the Spring ‘27 release notes yet, but the release updates it will enforce are already listed in the Winter ‘27 notes under Scheduled to Be Enforced in Spring ‘27. This post covers the ones that change how your code and integrations behave. For each one: what it looks like when it breaks, and how to test it before your org upgrades.
Spring ‘27 dates
| Milestone | Date |
|---|---|
| OAuth device flow limited to local external client apps | 30 November 2026 |
| Sandboxes on preview instances upgraded | 10 January 2027 |
| OAuth username-password, user-agent and hybrid user-agent flows retired | 20 February 2027 |
| Every instance on Spring ‘27 | 20 February 2027 |
The sandbox and completion dates come from Salesforce’s target release version table. Production upgrades fall between those two, on a date set by your instance, so look yours up on the Maintenances tab of Salesforce Trust. If you want a sandbox on Spring ‘27 in January, it has to sit on a preview instance, and the cutoff for refreshing onto one falls shortly before the preview starts.
The release updates at a glance
| Change | Breaks | How to test |
|---|---|---|
| Sharing recalculation after role and group changes can run asynchronously | Apex and flows that need share records straight after changing a role or group | Checkbox in Sharing Settings |
| Non-public fields removed from custom object data in Aura action responses | Components that read an undocumented system field | Test Run on the release update |
| Instanced URLs in API traffic stop being supported | Integrations calling an old instance hostname | Search configs for instance hostnames |
| Three OAuth flows retired on 20 February 2027 | Integrations logging in with a stored password, or old browser and mobile apps | Login History |
| Salesforce Connect cross-org adapter legacy authentication retired | Cross-org external data sources using password or OAuth authentication | Review external data sources |
| Salesforce to Salesforce retired | Record sharing between orgs through S2S | Check whether S2S is enabled |
| Dedicated View Setup Audit Trail permission | New users and tools that read the audit trail | Review permission sets |
Sharing recalculation can run after your transaction
Since Summer ‘25, when an admin changes a role or a group membership, Salesforce can recalculate the related owner-based sharing rules and account owner shares in the background. The role or group change itself still happens straight away. Only the share records catch up later. The behaviour was turned on in every org in April 2026.
Changes made from Apex and flows were left out. Those still recalculate synchronously until the Update Apex Code and Flows for Changed Sharing Recalculation Behavior release update is enforced in Spring ‘27.
Salesforce doesn’t make every recalculation asynchronous. It decides per change, based on how many records the affected users own, how complex the operation is and how busy the database is. The help article describes the trigger as very high ownership skew and uses the example of one user owning more than 300,000 records of the same object. Most changes will still run synchronously. Your code just can’t assume they will.
What breaks
Two patterns, both named in the help article:
- A query or assertion for share records with
RowCause = 'Rule'straight after a role or group change finds nothing yet. System.runAs()for the affected user doesn’t show the access they should have until the recalculation finishes.
In a test, it looks like this:
// Inside a test, after the user's role has changed
// (role change done in a System.runAs block to avoid MIXED_DML_OPERATION)
List<AccountShare> ruleShares = [
SELECT Id FROM AccountShare
WHERE AccountId = :acct.Id AND RowCause = 'Rule'
];
// Passes while recalculation is synchronous.
// Fails when the recalculation runs in the background.
Assert.areEqual(1, ruleShares.size());
The same gap shows up in production code. A flow that adds a user to a public group and then hands that user a record they can only reach through a group-based sharing rule can fail with an access error, or quietly skip the record.
How to find it
There’s no Test Run button for this release update. Salesforce gives you a switch instead:
- In Setup, open Sharing Settings and turn on Test asynchronous sharing recalculation in Apex tests.
- Run all your Apex tests. Each failure points at code that relies on immediate share records.
- Fix the code (below), rerun, then turn the setting off again. Salesforce says to switch it off afterwards to avoid false errors.
For flows, search the metadata. A pro-code search for GroupMember, UserRole and UserRoleId across flows and Apex finds most candidates in a few minutes.
How to fix it
In production code, stop treating the share as a side effect you can rely on in the same transaction. If the next step needs the access, check that the share exists first. If it doesn’t, hand the step to a Queueable that runs later and checks again.
In tests, separate the two concerns. Test that the role or group change happened in one test. Test that a user in a given role can see a record in another, with the role assigned before the records are created, so no recalculation is needed. The help article says nothing about whether Test.stopTest() waits for an asynchronous recalculation, so I wouldn’t build tests on it.
If a production run does go asynchronous, you’ll see three Setup Audit Trail rows instead of one, a job of type function Object() { [native code] } - Async Owner Sharing Rule Recalculation on the Background Jobs page, and emails to the admin who made the change. For a refresher on how rule shares and implicit shares fit together, see our Salesforce security model guide.
Non-public fields disappear from Aura action responses
The Salesforce release note says this update removes “non-public system fields from custom object data returned in Aura action responses”. These are internal fields that were never part of the public API. They have always been sent to the browser, and some components read them.
After enforcement those properties are simply missing. A component that reads one gets undefined. Depending on the code, that’s a JavaScript error, which someone notices, or a blank cell, which nobody notices for a week.
Two kinds of code are exposed:
- Components that reference a field you won’t find in the object’s describe result.
- Code that walks every key on a returned record, such as
Object.keys(record)or afor...inloop that builds table columns. Fewer keys means a different table.
The release note only mentions Aura and “Lightning components”. Lightning web components call Apex through @salesforce/apex over the same Aura action transport (open the network tab and you’ll see the calls), so treat LWC as in scope until you’ve tested it. Salesforce Ben reported that non-public fields also stopped coming back for standard objects when the Test Run was on, which goes beyond what the release note says.
To check a field, compare it with the public list:
sf sobject describe --sobject My_Object__c --target-org my-sandbox
Then turn on the release update’s Test Run in a sandbox and click through every component that renders data returned from Apex. Fix any component that reads a field missing from the describe output.
Instanced URLs stop working in API traffic
This update was first available in Summer ‘25 and has been postponed more than once. It’s now listed for Spring ‘27. After enforcement, API calls sent to an old instance hostname such as na139.salesforce.com are no longer supported. Traffic has to go to the org’s My Domain URL.
The usual offenders are middleware connections set up years ago and scripts with a hard-coded base URL. Search integration configs, named credentials and environment variables for .salesforce.com hostnames that start with an instance name. For OAuth integrations, read instance_url from the token response on every login instead of storing a hostname.
Three login flows end on 20 February 2027
The OAuth username-password flow was due to be retired with Winter ‘27 and was postponed to 20 February 2027. The user-agent and hybrid user-agent flows are retired the same day. Before that, on 30 November 2026, the device flow stops working for anything except a local external client app with a localhost callback URL.
We cover each of these, with replacements and how to find affected integrations in Login History, in Salesforce OAuth security changes 2026–2027. One developer-specific note: Salesforce CLI’s authorisation guide covers org login web for interactive use and org login jwt for CI. If a script still runs sf org login device, move it to one of those before 30 November.
Smaller changes in the same release
Salesforce Connect cross-org adapter. Password and OAuth 2.0 authentication for cross-org external data sources are retired in Spring ‘27. Move each data source to a named credential. Our named credentials and external credentials setup guide walks through that setup.
Salesforce to Salesforce. S2S is retired in Spring ‘27. Salesforce’s suggested replacements are Partner Cloud, Data Cloud One, MuleSoft Anypoint Platform and MuleSoft for Flow, depending on what the connection does.
View Setup Audit Trail. Access to the audit trail moves to its own permission, so you can grant it without the much broader View Setup and Configuration. Existing access is kept. Any user created later, including a new integration user for a monitoring tool that queries SetupAuditTrail, needs the new permission in a profile or permission set.
Accessibility at high zoom. To Do lists and Lightning dual listboxes get WCAG 2.2 reflow behaviour above 200% zoom. If you wrap lightning-dual-listbox with custom CSS, check it at 200% and 400%.
A testing order for January
- Now: run Apex tests with the asynchronous sharing checkbox on, in a developer sandbox. This works today and needs no preview instance.
- Now: search integration configs for instanced hostnames and for the OAuth flows being retired.
- Now: in a sandbox, turn on the Test Run for the Aura action response update and click through your custom components. The update has been available since Summer ‘26.
- Before your production upgrade: rerun the full Apex test suite and the integration smoke tests against the preview sandbox.
- Before 20 February 2027: confirm no logins in Login History still use the retired OAuth flows.
The Spring ‘27 release notes should add detail when they arrive. Salesforce has postponed several of these updates before, so check the Release Updates page in Setup before you plan around any date in this post.