Skip to content

Shopify Dude Fix

Shopify B2B Customer Account API Returns Empty Locations or Orders? Check Company Roles

A November 17, 2026 Customer Account API access change hides B2B locations and company orders the signed-in customer no longer has permission to see. Fix role assumptions, not GraphQL syntax.

Quick answer: On November 17, 2026, Shopify tightened B2B Customer Account API access on every API version. A signed-in customer can read only company data and orders they are entitled to access. Queries may still validate while returning null, empty lists or fewer results. Check the customer’s company membership and location roles before changing GraphQL.
On this page

Why this looks like a broken query

There is no schema change. Shopify changed authorization behavior. CompanyContact.locations returns an empty list unless the contact belongs to the current customer. For the current customer’s contact, location access is limited to locations where the customer has a role, including via Company.locations and companyLocation(id:). For a location where the customer lacks a role, taxIdentifier, contacts and roleAssignments may be null or empty.

When a customer is removed from a company, order(id:) and draftOrder(id:) no longer expose that company’s records. customer.orders and customer.draftOrders exclude them, while personal orders remain accessible.

Fix the account experience, not the access rules

  1. Confirm which customer is authenticated and which company/location roles they currently hold.
  2. Separate personal orders from company orders in UI state and caches.
  3. Treat an empty company list as a valid authorization outcome, not a reason to retry indefinitely.
  4. Render location-specific controls only when the customer can access the location; do not show a stale location selector from cached data.
  5. Invalidate account-side cached company/order data when membership changes. Never use a privileged Admin API token in the browser to bypass the customer’s permissions.

Example: an account dashboard after staff removal

A purchasing employee used to see invoices for a company location. After the merchant removes that employee from the company, the dashboard’s company order history becomes empty while personal purchases remain. That is expected authorization behavior, not an API outage. Show a neutral “No accessible company orders” state and direct legitimate access requests to the company’s administrator.

Common misunderstanding: “The query succeeded yesterday, so an empty response must be pagination or a bad API version.” Shopify says this behavior applies to all Customer Account API versions without schema changes. Check membership and location roles first.
How to test this

  1. Use two test customers: one with an assigned company-location role and one without.
  2. Run the same location query for each and compare accessible fields.
  3. Verify the authorized customer can see only their permitted locations.
  4. Remove a test customer’s company membership and confirm company orders and draft orders disappear, including direct-ID lookups.
  5. Confirm personal orders remain visible and the UI clears stale cached company data.
  6. Restore membership and verify access returns only where explicitly authorized.