Skip to content

Point service account access errors at organization settings instead of a fixed admin path - #8978

Merged
alexanderMontague merged 1 commit into
mainfrom
eddie/store-commands-token-401
Oct 30, 2026
Merged

alexanderMontague merged 1 commit into
mainfrom
eddie/store-commands-token-401

Conversation

@egaodd

@egaodd egaodd commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Related to shop/issues-develop#24293

TL;DR: The errors shown when a service account token lacks access now point at "your organization's settings in the Shopify admin" instead of the fixed path Settings > Users > Security.

WHY are these changes introduced?

This PR originally added the "This token can't manage dev stores." error for store create dev, store list and store delete. #8999 landed a fuller version of that fix on main (OrganizationStoreAccessError / organizationStoresRequestDoc), so that part is dropped here.

What's left is the wording. Both #8999 and the token exchange error from #9000 tell the user to go to Settings > Users > Security in the Shopify admin. Service accounts now live under Organization settings > Security, and the page can move again. A hardcoded path goes stale; "your organization's settings" stays correct.

WHAT is this pull request doing?

  • OrganizationStoreAccessError in @shopify/organizations (shown when the Organizations API refuses a token for store list, store create dev and store delete) now says:

    Give the service account Dev store management access in your organization's settings in the Shopify admin.

  • AutomationTokenExchangeError in cli-kit (shown when Identity refuses the token exchange because the service account lacks a capability, or the token was revoked or expired) uses the same location wording.
  • Tests that asserted the old path are updated.
  • No changeset: both messages are unreleased and already covered by the pending automation-token-exchange-errors and store-command changesets.

How to manually test your changes?

With a service account token that doesn't have Dev store management:

export SHOPIFY_SERVICE_ACCOUNT_TOKEN=<token>
shopify store list --organization-id <its org id>

The next step reads "Give the service account Dev store management access in your organization's settings in the Shopify admin." and no longer names Settings > Users > Security.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@egaodd
egaodd requested a review from a team as a code owner October 21, 2026 17:05
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Oct 21, 2026
…ixed admin path

The errors for a service account token that lacks access named the admin
page as "Settings > Users > Security". Service accounts have since moved
to Organization settings > Security, and the page can move again. The
errors now say "in your organization's settings in the Shopify admin",
which stays true across admin layout changes.

Both the Organizations API refusal in @Shopify/organizations and the
token exchange refusal in cli-kit are updated. No changeset: both
messages are unreleased and already covered by pending changesets.
@alexanderMontague
alexanderMontague force-pushed the eddie/store-commands-token-401 branch from c13c562 to e8dc74b Compare October 29, 2026 18:58
@alexanderMontague alexanderMontague changed the title Explain when a token can't manage dev stores instead of a raw 401 Point service account access errors at organization settings instead of a fixed admin path Oct 29, 2026
@alexanderMontague
alexanderMontague added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 9052006 Oct 30, 2026
29 checks passed
@alexanderMontague
alexanderMontague deleted the eddie/store-commands-token-401 branch October 30, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants