Apple Configurator 2.21: cfgutil GET returns valid JSON but exit code 1

We are developing a mobile-device diagnostics platform and are investigating unexpected behavior in Apple Configurator's cfgutil command-line tool.

Environment

  • MacBook Pro running macOS 26.7.1
  • Apple Configurator 2.21, cfgutil build 1003.4
  • Two authorized test iPhones connected simultaneously
  • Read-only operations with explicit ECID targeting

Observed issue

We executed an explicitly targeted property read:

cfgutil --ecid <TARGET_ECID> --format JSON --timeout 15 get deviceClass

The captured results were:

  • Valid JSON response.
  • The Devices array contained only the selected iPhone.
  • The selected device's Output contained a nonempty deviceClass value.
  • The device-specific Output.Errors object was empty.
  • Standard error was empty.
  • The process nevertheless exited with status code 1.

We observed substantially the same behavior on two different iPhones in separate controlled tests.

For comparison, positive ECID-filtered list requests returned the selected device with exit code 0. Requests using an unknown ECID returned "no devices found" with exit code 1.

Questions

  1. Is exit status 1 expected for a successful cfgutil get deviceClass operation in Apple Configurator 2.21?
  2. If JSON contains valid property data and no device-specific error, what is the authoritative method for determining command success?
  3. Does --ecid guarantee that a GET operation is confined to the selected device when multiple iPhones are connected?
  4. Is there a documented limitation involving iPhones in their initial setup state?
  5. Is there an Apple-supported alternative for reliable, read-only, exact-device identification and property retrieval?

Reliable device targeting and unambiguous command results are essential for preventing cross-device attribution in our application.

We have not retried the failed operations because the exit-code behavior is unexplained.

Related Apple Feedback Assistant report: FB25599039

Any guidance from Apple engineers or developers familiar with Configurator's command-line behavior would be appreciated.