# Cloud Identity Devices - [API documentation](#api-documentation) - [Query documentation](#query-documentation) - [Definitions](#definitions) - [Create a company device](#create-a-company-device) - [Delete devices](#delete-devices) - [Wipe devices](#wipe-devices) - [Perform device actions](#perform-device-actions) - [Synchronize devices](#synchronize-devices) - [Display devices](#display-devices) - [Print devices](#print-devices) - [Display device counts](#display-device-counts) - [Approve or block device users](#approve-or-block-device-users) - [Delete device users](#delete-device-users) - [Wipe device users](#wipe-device-users) - [Perform device user actions](#perform-device-user-actions) - [Display device users](#display-device-users) - [Display device user counts](#display-device-user-counts) - [Print device users](#print-device-users) - [Display device user client state](#display-device-user-client-state) - [Update device user client state](#update-device-user-client-state) ## API documentation * [Cloud Identity API - Devices](https://cloud.google.com/identity/docs/reference/rest/v1/devices) * [Cloud Identity API - Device Users](https://cloud.google.com/identity/docs/reference/rest/v1/devices.deviceUsers) * [Cloud Identity API - Device User Client States](https://cloud.google.com/identity/docs/reference/rest/v1/devices.deviceUsers.clientStates) * [Endpoint Verification](https://cloud.google.com/endpoint-verification/docs/overview) ## Query documentation * [Filters](https://support.google.com/a/answer/7549103) * [Device Search Fields](https://developers.google.com/admin-sdk/directory/v1/search-operators) ## Definitions ``` ::= ::= "(,)*" ::= See: https://support.google.com/a/answer/7549103 ::= "(,)*" ::= devices/ ::= "(,)*" ::= | devicesn | (query:)|(query ) ::= android|chrome_os|google_sync|linux|mac_os|windows ::= devices//deviceUsers/ ::= | (query:)|(query ) ::= androidspecificattributes| assettag| basebandversion| bootloaderversion| brand| buildnumber| compromisedstate| createtime| deviceid| devicetype| enableddeveloperoptions| enabledusbdebugging| endpointverificationspecificattributes| encryptionstate| hostname| imei| kernelversion| lastsynctime| managementstate| manufacturer| meid| model| name| networkoperator| osversion| otheraccounts| ownertype| releaseversion| securitypatchtime| serialnumber| unifieddeviceid| wifimacaddresses ::= "(,)*" ::= cancelwipe| wipe ::= compromisedstate| createtime| firstsynctime| languagecode| lastsynctime| managementstate| name| passwordstate| useragent| useremail ::= "(,)*" ::= createtime|devicetype|lastsynctime|model|osversion|serialnumber ::= approve| block| cancelwipe| wipe ``` ## Create a company device Adds a new device to the Google company-owned inventory. Once a user is assigned and enrolled on the device the device will be considered company-owned for management purposes. The device will also register as company-owned with Google services like [Context-Aware Access (CAA)](https://support.google.com/a/answer/9275380). ``` gam create device serialnumber devicetype [assettag ] ``` Arguments `serialnumber ` and `devicetype ` are required; you can optionally specify `assettag `. ## Delete devices Delete a device from appearing in the Admin console, stop syncing for the device user. No user data should be removed. ``` gam delete device [doit] ``` If `` uses a query, the `doit` option must be used to enable execution. ## Wipe devices Wiping a device performs a factory reset, all device data is removed. ``` gam cancelwipe device [doit] gam wipe device [removeresetlock] [doit] ``` If `` uses a query, the `doit` option must be used to enable execution. Specifying `removeresetlock` will remove the account lock on the Android or iOS device. This lock is enabled by default and requires the existing device user to log in after the wipe in order to unlock the device. * See: https://support.google.com/android/answer/9459346 ## Perform device actions This is an alternative form of the above commands ``` gam update device action [removeresetlock] [doit] ``` If `` uses a query, the `doit` option must be used to enable execution. Specifying `removeresetlock` when `` is `wipe` will remove the account lock on the Android or iOS device. This lock is enabled by default and requires the existing device user to log in after the wipe in order to unlock the device. * See: https://support.google.com/android/answer/9459346 ## Synchronize devices This command generates a list of your current company devices, either a complete list or a subset based on a query. A CSV file is read to generate another list of devices. At a minimum, two values are required for devices in the CSV file list; a device type and a serial number. For the device type, you can either specify a static device type or specify the column in the CSV file that contains a device type. * `static_devicetype ` - A fixed device type * `devicetype_column ` - The name of the column containing device types; if not specified, `deviceType` is used For the serial number, you must specify the column in the CSV file that contains a serial number. * `serialnumber_column ` - The name of the column containing serial numbers; if not specified, `serialNumber` is used You can optionally specify the column in the CSV file that contains an asset tag. * `assettag_column ` - The name of the column containing asset tags; the typical value is `assetTag` These two/three columns are used to match current company devices against the CSV file devices. * Devices in the CSV device list will be created if they are not the the current company device list. * Devices in the current company device list that are not in the CSV device list will have an optional operation performed on them. * `unassigned_missing_action delete|wipe|none` - Perform this operation if the company device has never been assigned; default action is `delete` * `assigned_missing_action delete|wipe|none` - Perform this operation if the company device has been assigned; default action is `none` If `preview` is specified, the operations that would be performed are previewed but are not performed; use this to test. ``` gam sync devices [(query )|(queries ) (querytime