shopify app deploy App Management 404 "Cannot find a valid organization" (CLI 4.7.1)

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?

Function

Expected behavior

shopify app deploy succeeds and creates an app version that includes the Cart Transform Function and Discount Function wasm. Dashboard “Create version” and CLI deploy should both be able to ship those Functions.

Actual behavior

Auth succeeds (App Automation Token as partners_token, and later owner device login as device_auth with :check_mark: Logged in), then App Management GraphQL returns HTTP 404 on appByKey: “Cannot find a valid organization”. Deploy never reaches Function wasm upload. Dashboard can still create config-only versions (gift-desk-1/2/3). Public distribution is already selected. Same 404 with latest CLI, --allow-updates, --client-id, and SHOPIFY_FLAG_ORGANIZATION_ID set to either org id (Partner 5042712 or Dev Dashboard 226018209).

Reproduction steps

  1. App Gift Desk id 418561654785, client_id ab4316d89d9ca3e507076e23d69c9304, account xuxiaochenkobe@gmail.com.
  2. Partner org 5042712 (partners.shopify.com/5042712). Dev Dashboard org 226018209 (John Smith).
  3. From the app directory run:
    npx @shopify/cli@latest app deploy --allow-updates --client-id ab4316d89d9ca3e507076e23d69c9304 --version gift-desk-4
  4. Auth completes. Then App Management 404 on appByKey.

Verbose output

The App Management GraphQL API responded unsuccessfully with the HTTP status 404 and errors:
“Cannot find a valid organization”

Request IDs:

  • 01a0661f-2bf6-7ee5-b68d-3d475682b947-1788419714 (owner device login, then 404)
  • a6fb3fc6-c6ce-4942-9dfd-856dc32e23a8-1788419741 (same session, device_auth retry)
  • 0ad1dc7e-932b-44d6-83f3-fa0698b78041-1788418593 (rotated App Automation Token)
  • ece89c2e-3d78-4709-82c4-1b7d394ef1c4-1788415133 (earlier automation token)
  • 01a065b8-31dd-7f9e-a7dc-81f7f9c5d9f7-1788412965 (earlier token)
  • af49504b-b426-4d45-95c0-18cb32b6d0ad-1788412819 (earlier owner device login)

Help Center (Jellie, Merchant Success) said CLI issues are not formally escalated and to post here. Please attach this Partner org / app to App Management so CLI can deploy the Functions.

Operating system

Linux amd64

CLI version

4.7.1

Shell

bash

Nodejs version

22.23.2

What language and version are you using in your application?

TypeScript (React Router 7) + Shopify Functions wasm