Skip to content
Work Insights
Login →
Talk to a senior advisor→
Social Media Management company

Shopify B2B location permissions changed: how to test company data and order access safely

in X
Shopify B2B location permissions changed: how to test company data and order access safely
Social Media Management company2026

On November 17, 2026, Shopify changed what business-to-business customers can retrieve through the Customer Account API. The adjustment is easy to underestimate because the GraphQL schema itself has not changed. An integration can still execute a valid query and receive a response, yet discover that an expected company location, tax identifier, contact list, or historical order is no longer present. That is an authorization outcome, not automatically a database outage. Teams building B2B portals should test their assumptions about company membership rather than attempt to restore data the customer should not see.

What Shopify changed

A customer may now read company data and orders only for companies they belong to. The CompanyContact.locations field returns an empty collection unless the contact belongs to the current customer. Customers can read locations for which they hold a role through their contact's locations, Company.locations, and companyLocation(id:). For locations without an appropriate role, CompanyLocation fields such as taxIdentifier, contacts, and roleAssignments can return null or an empty list. Removing a customer from a company also removes that company's orders and draft orders from the customer's accessible history; personal orders remain separate.

Build a realistic authorization test matrix

Start with a nonproduction environment and controlled test identities. Set up a business customer authorized for one company location, another location without the required role, and a customer who has been removed from a company. Prepare at least one personal order and one company order. Keep the identities and orders clearly distinguishable without using actual tax identifiers or customer information. Verify that your test account uses the same customer-scoped authentication route as the production storefront: an administrator or backend service token is not a substitute for a customer's session.

Original text-free editorial illustration of separate company locations and an authorized customer's restricted access pathway
Conceptual illustration of role-based access between one customer and multiple B2B locations.

Implementation steps for application teams

1. Inventory assumptions in the UI and data layer

Review location pickers, contact cards, taxation forms, invoice details, and order-history components. Search for code that immediately reads the first element of locations, presumes contacts always exist, or renders taxIdentifier without a null check. Confirm that any cached API response is partitioned by the current customer and the authorized company context. Stale server-side caches and browser storage can reveal data from a previous company selection even after the API itself begins correctly withholding information.

2. Separate restricted data from transport errors

Run the same permitted query with an authorized session and an unauthorized one. Record GraphQL errors separately from an empty value returned under the tightened access rules. An empty company location selector should have a clear explanation and a safe next action, not an infinite loading state. Avoid repeated retries on a successful response merely because a protected field is null. Never introduce an elevated Admin API fallback that sends restricted B2B data to the customer portal: that would undo the authorization improvement.

3. Test the loss of company membership

Open an order while the test customer is still a company member, then remove membership in the test environment. Check order(id:), draftOrder(id:), customer.orders, and customer.draftOrders again from that customer's session. Try a previously bookmarked direct order URL and navigate back from a checkout flow. Confirm that company orders are no longer available and that personal orders remain visible. Do not rely on hiding navigation links alone; the underlying request must enforce the same boundary.

Operational troubleshooting and validation

Watch for a sudden increase in empty location selectors after deployment, but do not log sensitive contacts or tax values to diagnose the issue. Distinguish legitimate access restrictions from missing account-role assignments, stale client state, or a real service error. Include a regression test for each user-location combination, verify mobile and desktop sessions, and review cache invalidation when a membership changes. If an app's business workflow genuinely requires wider access, redesign the authorization and consent model with the merchant rather than query around the new customer boundary.

What a successful rollout looks like

The application should behave predictably for an authorized location, a location without a role, an empty list, an ex-member, and a personal-order history. The change is an opportunity to simplify security assumptions: the Customer Account API decides what the customer may read, and your application turns that result into a safe, understandable experience. Shopify's published changelog and API reference should remain the basis for any field-level decision because the details apply across versions while other API behavior can continue to evolve.

Sources and further reading

Melody Bedingfield

Brightery Technical Support team member, and technical writer who's addict to new technology, robotics and automation

Editorially reviewedNovember 17, 2026

0 Responses

Share your perspective and continue the conversation.

No responses yet

Be the first to share your thoughts.

Join the conversation