Skip to main content

mobiledevices

Creates, updates, deletes, gets or lists a mobiledevices resource.

Overview

Namemobiledevices
TypeResource
Idgoogleadmin.directory.mobiledevices

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namearrayThe list of the owner's user names. If your application needs the current list of device owner names, use the get method. For more information about retrieving mobile device user information, see the Developer's Guide.
adbStatusbooleanAdb (USB debugging) enabled or disabled on device (Read-only)
applicationsarrayThe list of applications installed on an Android mobile device. It is not applicable to Google Sync and iOS devices. The list includes any Android applications that access Google Workspace data. When updating an applications list, it is important to note that updates replace the existing list. If the Android device has two existing applications and the API updates the list with five applications, the is now the updated list of five applications.
basebandVersionstringThe device's baseband version.
bootloaderVersionstringMobile Device Bootloader version (Read-only)
brandstringMobile Device Brand (Read-only)
buildNumberstringThe device's operating system build number.
defaultLanguagestringThe default locale used on the device.
developerOptionsStatusbooleanDeveloper options enabled or disabled on device (Read-only)
deviceCompromisedStatusstringThe compromised device status.
deviceIdstringThe serial number for a Google Sync mobile device. For Android and iOS devices, this is a software generated unique identifier.
devicePasswordStatusstringDevicePasswordStatus (Read-only)
emailarrayThe list of the owner's email addresses. If your application needs the current list of user emails, use the get method. For additional information, see the retrieve a user method.
encryptionStatusstringMobile Device Encryption Status (Read-only)
etagstringETag of the resource.
firstSyncstring (date-time)Date and time the device was first synchronized with the policy settings in the G Suite administrator control panel (Read-only)
hardwarestringMobile Device Hardware (Read-only)
hardwareIdstringThe IMEI/MEID unique identifier for Android hardware. It is not applicable to Google Sync devices. When adding an Android mobile device, this is an optional property. When updating one of these devices, this is a read-only property.
imeistringThe device's IMEI number.
kernelVersionstringThe device's kernel version.
kindstringThe type of the API resource. For Mobiledevices resources, the value is admin#directory#mobiledevice. (default: admin#directory#mobiledevice)
lastSyncstring (date-time)Date and time the device was last synchronized with the policy settings in the G Suite administrator control panel (Read-only)
managedAccountIsOnOwnerProfilebooleanBoolean indicating if this account is on owner/primary profile or not.
manufacturerstringMobile Device manufacturer (Read-only)
meidstringThe device's MEID number.
modelstringThe mobile device's model name, for example Nexus S. This property can be updated. For more information, see the Developer's Guide.
networkOperatorstringMobile Device mobile or network operator (if available) (Read-only)
osstringThe mobile device's operating system, for example IOS 4.3 or Android 2.3.5. This property can be updated. For more information, see the Developer's Guide.
otherAccountsInfoarrayThe list of accounts added on device (Read-only)
privilegestringDMAgentPermission (Read-only)
releaseVersionstringMobile Device release version version (Read-only)
resourceIdstringThe unique ID the API service uses to identify the mobile device.
securityPatchLevelstring (int64)Mobile Device Security patch level (Read-only)
serialNumberstringThe device's serial number.
statusstringThe device's status.
supportsWorkProfilebooleanWork profile supported on device (Read-only)
typestringThe type of mobile device.
unknownSourcesStatusbooleanUnknown sources enabled or disabled on device (Read-only)
userAgentstringGives information about the device such as os version. This property can be updated. For more information, see the Developer's Guide.
wifiMacAddressstringThe device's MAC address on Wi-Fi networks.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomerId, resourceIdprojectionRetrieves a mobile device's properties.
listselectcustomerIdmaxResults, orderBy, pageToken, projection, query, sortOrderRetrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list that includes company-owned devices, use the Cloud Identity Devices API instead. This method times out after 60 minutes. For more information, see Troubleshoot error codes.
deletedeletecustomerId, resourceIdRemoves a mobile device.
actionexeccustomerId, resourceIdTakes an action that affects a mobile device. For example, remotely wiping a device.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
customerIdstring
resourceIdstring
maxResultsinteger (int32)
orderBystring
pageTokenstring
projectionstring
querystring
sortOrderstring

SELECT examples

Retrieves a mobile device's properties.

SELECT
name,
adbStatus,
applications,
basebandVersion,
bootloaderVersion,
brand,
buildNumber,
defaultLanguage,
developerOptionsStatus,
deviceCompromisedStatus,
deviceId,
devicePasswordStatus,
email,
encryptionStatus,
etag,
firstSync,
hardware,
hardwareId,
imei,
kernelVersion,
kind,
lastSync,
managedAccountIsOnOwnerProfile,
manufacturer,
meid,
model,
networkOperator,
os,
otherAccountsInfo,
privilege,
releaseVersion,
resourceId,
securityPatchLevel,
serialNumber,
status,
supportsWorkProfile,
type,
unknownSourcesStatus,
userAgent,
wifiMacAddress
FROM googleadmin.directory.mobiledevices
WHERE customerId = '{{ customerId }}' -- required
AND resourceId = '{{ resourceId }}' -- required
AND projection = '{{ projection }}';

DELETE examples

Removes a mobile device.

DELETE FROM googleadmin.directory.mobiledevices
WHERE customerId = '{{ customerId }}' --required
AND resourceId = '{{ resourceId }}' --required;

Lifecycle Methods

Takes an action that affects a mobile device. For example, remotely wiping a device.

EXEC googleadmin.directory.mobiledevices.action 
@customerId='{{ customerId }}' --required,
@resourceId='{{ resourceId }}' --required
@@json=
'{
"action": "{{ action }}"
}';