I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
App
Expected behavior
As an unpublished app, with read all orders access granted, I expect to be able to use it as an optional scope
Actual behavior
(await shopify.scopes.query()).optional.includes(“read_all_orders”)
// expected: true
// actual: false
Requesting it directly returns Shopify’s own view of the declared set — the TOML list minus read_all_orders:
RequestGrantUserError: The requested optional scopes should be a subset of
the declared optional scopes: [read_orders, write_orders, read_customers,
write_customers, read_products, write_products, read_script_tags,
write_script_tags, read_locales, write_discounts, customer_read_customers,
write_draft_orders, read_merchant_managed_fulfillment_orders, read_locations]
### Reproduction steps
1. Partner Dashboard → request **Read all orders** for the unpublished app. Approved (`Status: Granted — auto granted scope`).
2. Add it to the config:
```toml
[access_scopes]
scopes = ""
optional_scopes = ["read_orders", "write_orders", "read_all_orders", ...]
-
shopify app deploy -c <config>→ succeeds, new version active. -
In the embedded admin:
(await shopify.scopes.query()).optional.includes("read_all_orders") // expected: true // actual: false -
Requesting it directly returns Shopify’s own view of the declared set — the TOML list minus
read_all_orders:RequestGrantUserError: The requested optional scopes should be a subset of the declared optional scopes: [read_orders, write_orders, read_customers, write_customers, read_products, write_products, read_script_tags, write_script_tags, read_locales, write_discounts, customer_read_customers, write_draft_orders, read_merchant_managed_fulfillment_orders, read_locations] -
Repeat steps 2–4 on the published app → the scope appears in
optional, the merchant grants it through the standard modal, and the full order history becomes retrievable.
Verbose output
Not relevant, the deployment works just fine and the shopify dev dashboard shows that the read_all_orders is present.