Hi
The gam delete device <DeviceEntity> command consistently fails with an INVALID_ARGUMENT error when using a valid Cloud Identity device ID in the correct syntax (devices/<UUID>). All authentication and token flows complete successfully, and the device ID matches the format output by gam print devices.
Identified a device ID via:
gam print devices fields deviceidExample device ID:
3dbc03e6-6d12-4b52-a419-89230ac080d8Attempted deletion using:
gam delete device "devices/3dbc03e6-6d12-4b52-a419-89230ac080d8" doitResult:
Device: devices/3dbc03e6-6d12-4b52-a419-89230ac080d8, Delete Failed: Request contains an invalid argument.The OAuth token is issued successfully (200 OK).
The request to DELETE https://cloudidentity.googleapis.com/v1/devices/<device_id>?customer=customers/my_customer fails.
Response:
{ "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT" } }The deviceid exists in the output of gam print devices.
The format used is exactly as per DeviceID ::= devices/<String>.
The doit flag is used correctly.
The device is not a ChromeOS or mobile device — confirmed via gam print cros and gam print mobile.
Attempting gam info device "devices/<id>" results in the same INVALID_ARGUMENT error.
Are there scenarios where the deviceid from gam print devices may not be deletable through the gam delete device API path?
GAM version: 7.06.01
Python version: 3.13.3
OS: macOS 15.4 (Apple Silicon)
Command issued with elevated debug_level = 4
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/0de1310f-179b-4afa-a3e2-2a2a96b3eb59n%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Example device ID as per Google Admin Web console:
3dbc03e6-6d12-4b52-a419-89230ac080d8From the CSV generated in Step1 locate the "name" field column for corresponding device ID (as per Step2)
say for device ID above the "name" column has value as "devices/EiQ0MWQxM2MxNy1c7867sewe569edew678cdc302qd4%3D"
Attempted deletion using:
gam delete device <<name>>