Tool: list_devices
Lists devices for a given enterprise. Requires the enterprise ID in the parent field (e.g., enterprises/{enterpriseId}).
The following sample demonstrate how to use curl to invoke the list_devices MCP tool.
| Curl Request |
|---|
curl --location 'https://androidmanagement.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_devices", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to list devices for a given enterprise.
ListDevicesRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
parent |
The name of the enterprise in the form |
pageSize |
The requested page size. If unspecified, at most 10 devices will be returned. The maximum value is 100; values above 100 will be coerced to 100. The limits can change over time. |
pageToken |
A token identifying a page of results returned by the server. |
Output Schema
Response to a request to list devices for a given enterprise.
ListDevicesResponse
| JSON representation |
|---|
{
"devices": [
{
object ( |
| Fields | |
|---|---|
devices[] |
The list of devices. |
nextPageToken |
If there are more results, a token to retrieve next page of results. |
Device
| JSON representation |
|---|
{ "name": string, "userName": string, "managementMode": enum ( |
| Fields | |
|---|---|
name |
The name of the device in the form |
userName |
The resource name of the user that owns this device in the form |
managementMode |
The type of management mode Android Device Policy takes on the device. This influences which policy settings are supported. |
state |
The state to be applied to the device. This field can be modified by a patch request. Note that when calling |
appliedState |
The state currently applied to the device. |
policyCompliant |
Whether the device is compliant with its policy. |
nonComplianceDetails[] |
Details about policy settings that the device is not compliant with. |
enrollmentTime |
The time of device enrollment. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastStatusReportTime |
The last time the device sent a status report. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastPolicyComplianceReportTime |
Deprecated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastPolicySyncTime |
The last time the device fetched its policy. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
policyName |
The name of the policy applied to the device, in the form |
appliedPolicyName |
The name of the policy currently applied to the device. |
appliedPolicyVersion |
The version of the policy currently applied to the device. |
apiLevel |
The API level of the Android platform version running on the device. |
enrollmentTokenData |
If the device was enrolled with an enrollment token with additional data provided, this field contains that data. |
enrollmentTokenName |
If the device was enrolled with an enrollment token, this field contains the name of the token. |
disabledReason |
If the device state is |
softwareInfo |
Detailed information about the device software. This information is only available if |
hardwareInfo |
Detailed information about the device hardware. |
displays[] |
Detailed information about displays on the device. This information is only available if |
applicationReports[] |
Reports for apps installed on the device. This information is only available when |
previousDeviceNames[] |
If the same physical device has been enrolled multiple times, this field contains its previous device names. The serial number is used as the unique identifier to determine if the same physical device has enrolled previously. The names are in chronological order. |
networkInfo |
Device network information. This information is only available if |
memoryInfo |
Memory information: contains information about device memory and storage. |
memoryEvents[] |
Events related to memory and storage measurements in chronological order. This information is only available if Events are retained for a certain period of time and old events are deleted. |
powerManagementEvents[] |
Power management events on the device in chronological order. This information is only available if |
hardwareStatusSamples[] |
Hardware status samples in chronological order. This information is only available if |
deviceSettings |
Device settings information. This information is only available if |
user |
The user who owns the device. |
systemProperties |
Map of selected system properties name and value related to the device. This information is only available if An object containing a list of |
securityPosture |
Device's security posture value that reflects how secure the device is. |
ownership |
Ownership of the managed device. |
commonCriteriaModeInfo |
Information about Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (CC). This information is only available if |
appliedPasswordPolicies[] |
The password requirements currently applied to the device.
|
dpcMigrationInfo |
Output only. Information related to whether this device was migrated from being managed by another Device Policy Controller (DPC). |
defaultApplicationInfo[] |
Output only. The default application information for the All app types are reported on fully managed devices. |
NonComplianceDetail
| JSON representation |
|---|
{ "settingName": string, "nonComplianceReason": enum ( |
| Fields | |
|---|---|
settingName |
The name of the policy setting. This is the JSON field name of a top-level |
nonComplianceReason |
The reason the device is not in compliance with the setting. |
packageName |
The package name indicating which app is out of compliance, if applicable. |
fieldPath |
For settings with nested fields, if a particular nested field is out of compliance, this specifies the full path to the offending field. The path is formatted in the same way the policy JSON field would be referenced in JavaScript, that is: 1) For object-typed fields, the field name is followed by a dot then by a subfield name. 2) For array-typed fields, the field name is followed by the array index enclosed in brackets. For example, to indicate a problem with the |
currentValue |
If the policy setting could not be applied, the current value of the setting on the device. |
installationFailureReason |
If |
specificNonComplianceReason |
The policy-specific reason the device is not in compliance with the setting. |
specificNonComplianceContext |
Additional context for |
Value
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a null value. |
numberValue |
Represents a double value. |
stringValue |
Represents a string value. |
boolValue |
Represents a boolean value. |
structValue |
Represents a structured value. |
listValue |
Represents a repeated |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
SpecificNonComplianceContext
| JSON representation |
|---|
{ "oncWifiContext": { object ( |
| Fields | |
|---|---|
oncWifiContext |
Additional context for non-compliance related to Wi-Fi configuration. See |
passwordPoliciesContext |
Additional context for non-compliance related to password policies. See |
defaultApplicationContext |
Output only. Additional context for non-compliance related to default application settings. See |
OncWifiContext
| JSON representation |
|---|
{ "wifiGuid": string } |
| Fields | |
|---|---|
wifiGuid |
The GUID of non-compliant Wi-Fi configuration. |
PasswordPoliciesContext
| JSON representation |
|---|
{
"passwordPolicyScope": enum ( |
| Fields | |
|---|---|
passwordPolicyScope |
The scope of non-compliant password. |
DefaultApplicationContext
| JSON representation |
|---|
{
"defaultApplicationScope": enum ( |
| Fields | |
|---|---|
defaultApplicationScope |
Output only. The scope of non-compliant default application setting. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
UserFacingMessage
| JSON representation |
|---|
{ "localizedMessages": { string: string, ... }, "defaultMessage": string } |
| Fields | |
|---|---|
localizedMessages |
A map containing <locale, message> pairs, where locale is a well-formed BCP 47 language code, such as en-US, es-ES, or fr. An object containing a list of |
defaultMessage |
The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided. |
LocalizedMessagesEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
SoftwareInfo
| JSON representation |
|---|
{
"androidVersion": string,
"androidDevicePolicyVersionCode": integer,
"androidDevicePolicyVersionName": string,
"androidBuildNumber": string,
"deviceKernelVersion": string,
"bootloaderVersion": string,
"androidBuildTime": string,
"securityPatchLevel": string,
"primaryLanguageCode": string,
"deviceBuildSignature": string,
"systemUpdateInfo": {
object ( |
| Fields | |
|---|---|
androidVersion |
The user-visible Android version string. For example, |
androidDevicePolicyVersionCode |
The Android Device Policy app version code. |
androidDevicePolicyVersionName |
The Android Device Policy app version as displayed to the user. |
androidBuildNumber |
Android build ID string meant for displaying to the user. For example, |
deviceKernelVersion |
Kernel version, for example, |
bootloaderVersion |
The system bootloader version number, e.g. |
androidBuildTime |
Build time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
securityPatchLevel |
Security patch level, e.g. |
primaryLanguageCode |
An IETF BCP 47 language code for the primary locale on the device. |
deviceBuildSignature |
SHA-256 hash of |
systemUpdateInfo |
Information about a potential pending system update. |
SystemUpdateInfo
| JSON representation |
|---|
{
"updateStatus": enum ( |
| Fields | |
|---|---|
updateStatus |
The status of an update: whether an update exists and what type it is. |
updateReceivedTime |
The time when the update was first available. A zero value indicates that this field is not set. This field is set only if an update is available (that is, Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
HardwareInfo
| JSON representation |
|---|
{
"brand": string,
"hardware": string,
"deviceBasebandVersion": string,
"manufacturer": string,
"serialNumber": string,
"model": string,
"batteryShutdownTemperatures": [
number
],
"batteryThrottlingTemperatures": [
number
],
"cpuShutdownTemperatures": [
number
],
"cpuThrottlingTemperatures": [
number
],
"gpuShutdownTemperatures": [
number
],
"gpuThrottlingTemperatures": [
number
],
"skinShutdownTemperatures": [
number
],
"skinThrottlingTemperatures": [
number
],
"enterpriseSpecificId": string,
"euiccChipInfo": [
{
object ( |
| Fields | |
|---|---|
brand |
Brand of the device. For example, |
hardware |
Name of the hardware. For example, |
deviceBasebandVersion |
Baseband version. For example, |
manufacturer |
Manufacturer. For example, |
serialNumber |
The device serial number. However, for personally-owned devices running Android 12 and above, this is the same as the |
model |
The model of the device. For example, |
batteryShutdownTemperatures[] |
Battery shutdown temperature thresholds in Celsius for each battery on the device. |
batteryThrottlingTemperatures[] |
Battery throttling temperature thresholds in Celsius for each battery on the device. |
cpuShutdownTemperatures[] |
CPU shutdown temperature thresholds in Celsius for each CPU on the device. |
cpuThrottlingTemperatures[] |
CPU throttling temperature thresholds in Celsius for each CPU on the device. |
gpuShutdownTemperatures[] |
GPU shutdown temperature thresholds in Celsius for each GPU on the device. |
gpuThrottlingTemperatures[] |
GPU throttling temperature thresholds in Celsius for each GPU on the device. |
skinShutdownTemperatures[] |
Device skin shutdown temperature thresholds in Celsius. |
skinThrottlingTemperatures[] |
Device skin throttling temperature thresholds in Celsius. |
enterpriseSpecificId |
Output only. ID that uniquely identifies a personally-owned device in a particular organization. On the same physical device when enrolled with the same organization, this ID persists across setups and even factory resets. This ID is available on personally-owned devices with a work profile on devices running Android 12 and above. |
euiccChipInfo[] |
Output only. Information related to the eUICC chip. |
EuiccChipInfo
| JSON representation |
|---|
{ "eid": string } |
| Fields | |
|---|---|
eid |
Output only. The Embedded Identity Document (EID) that identifies the eUICC chip for each eUICC chip on the device. This is available on company owned devices running Android 13 and above. |
Display
| JSON representation |
|---|
{
"name": string,
"displayId": integer,
"refreshRate": integer,
"state": enum ( |
| Fields | |
|---|---|
name |
Name of the display. |
displayId |
Unique display id. |
refreshRate |
Refresh rate of the display in frames per second. |
state |
State of the display. |
width |
Display width in pixels. |
height |
Display height in pixels. |
density |
Display density expressed as dots-per-inch. |
ApplicationReport
| JSON representation |
|---|
{ "packageName": string, "versionName": string, "versionCode": integer, "events": [ { object ( |
| Fields | |
|---|---|
packageName |
Package name of the app. |
versionName |
The app version as displayed to the user. |
versionCode |
The app version code, which can be used to determine whether one version is more recent than another. |
events[] |
The list of app events which have occurred in the last 30 hours. |
displayName |
The display name of the app. |
packageSha256Hash |
The SHA-256 hash of the app's APK file, which can be used to verify the app hasn't been modified. Each byte of the hash value is represented as a two-digit hexadecimal number. |
signingKeyCertFingerprints[] |
The SHA-1 hash of each |
installerPackageName |
The package name of the app that installed this app. |
applicationSource |
The source of the package. |
state |
Application state. |
keyedAppStates[] |
List of keyed app states reported by the app. |
userFacingType |
Whether the app is user facing. |
ApplicationEvent
| JSON representation |
|---|
{
"eventType": enum ( |
| Fields | |
|---|---|
eventType |
App event type. |
createTime |
The creation time of the event. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
KeyedAppState
| JSON representation |
|---|
{
"key": string,
"severity": enum ( |
| Fields | |
|---|---|
key |
The key for the app state. Acts as a point of reference for what the app is providing state for. For example, when providing managed configuration feedback, this key could be the managed configuration key. |
severity |
The severity of the app state. |
message |
Optionally, a free-form message string to explain the app state. If the state was triggered by a particular value (e.g. a managed configuration value), it should be included in the message. |
data |
Optionally, a machine-readable value to be read by the EMM. For example, setting values that the admin can choose to query against in the EMM console (e.g. “notify me if the battery_warning data < 10”). |
createTime |
The creation time of the app state on the device. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastUpdateTime |
The time the app state was most recently updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
NetworkInfo
| JSON representation |
|---|
{
"imei": string,
"meid": string,
"wifiMacAddress": string,
"networkOperatorName": string,
"telephonyInfos": [
{
object ( |
| Fields | |
|---|---|
imei |
IMEI number of the GSM device. For example, |
meid |
MEID number of the CDMA device. For example, |
wifiMacAddress |
Wi-Fi MAC address of the device. For example, |
networkOperatorName |
Alphabetic name of current registered operator. For example, Vodafone. |
telephonyInfos[] |
Provides telephony information associated with each SIM card on the device. Only supported on fully managed devices starting from Android API level 23. |
TelephonyInfo
| JSON representation |
|---|
{ "phoneNumber": string, "carrierName": string, "iccId": string, "activationState": enum ( |
| Fields | |
|---|---|
phoneNumber |
The phone number associated with this SIM card. |
carrierName |
The carrier name associated with this SIM card. |
iccId |
Output only. The ICCID associated with this SIM card. |
activationState |
Output only. Activation state of the SIM card on the device. This is applicable for eSIMs only. This is supported on all devices for API level 35 and above. This is always |
configMode |
Output only. The configuration mode of the SIM card on the device. This is applicable for eSIMs only. This is supported on all devices for API level 35 and above. This is always |
MemoryInfo
| JSON representation |
|---|
{ "totalRam": string, "totalInternalStorage": string } |
| Fields | |
|---|---|
totalRam |
Total RAM on device in bytes. |
totalInternalStorage |
Total internal storage on device in bytes. |
MemoryEvent
| JSON representation |
|---|
{
"eventType": enum ( |
| Fields | |
|---|---|
eventType |
Event type. |
createTime |
The creation time of the event. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
byteCount |
The number of free bytes in the medium, or for |
PowerManagementEvent
| JSON representation |
|---|
{
"eventType": enum ( |
| Fields | |
|---|---|
eventType |
Event type. |
createTime |
The creation time of the event. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
batteryLevel |
For |
HardwareStatus
| JSON representation |
|---|
{ "createTime": string, "batteryTemperatures": [ number ], "cpuTemperatures": [ number ], "gpuTemperatures": [ number ], "skinTemperatures": [ number ], "fanSpeeds": [ number ], "cpuUsages": [ number ] } |
| Fields | |
|---|---|
createTime |
The time the measurements were taken. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
batteryTemperatures[] |
Current battery temperatures in Celsius for each battery on the device. |
cpuTemperatures[] |
Current CPU temperatures in Celsius for each CPU on the device. |
gpuTemperatures[] |
Current GPU temperatures in Celsius for each GPU on the device. |
skinTemperatures[] |
Current device skin temperatures in Celsius. |
fanSpeeds[] |
Fan speeds in RPM for each fan on the device. Empty array means that there are no fans or fan speed is not supported on the system. |
cpuUsages[] |
CPU usages in percentage for each core available on the device. Usage is 0 for each unplugged core. Empty array implies that CPU usage is not supported in the system. |
DeviceSettings
| JSON representation |
|---|
{
"isDeviceSecure": boolean,
"unknownSourcesEnabled": boolean,
"developmentSettingsEnabled": boolean,
"adbEnabled": boolean,
"isEncrypted": boolean,
"encryptionStatus": enum ( |
| Fields | |
|---|---|
isDeviceSecure |
Whether the device is secured with PIN/password. |
unknownSourcesEnabled |
Whether installing apps from unknown sources is enabled. |
developmentSettingsEnabled |
Whether developer mode is enabled on the device. |
adbEnabled |
Whether ADB is enabled on the device. |
isEncrypted |
Whether the storage encryption is enabled. |
encryptionStatus |
Encryption status from DevicePolicyManager. |
verifyAppsEnabled |
Whether Google Play Protect verification is enforced on the device. |
User
| JSON representation |
|---|
{ "accountIdentifier": string } |
| Fields | |
|---|---|
accountIdentifier |
A unique identifier you create for this user, such as |
SystemPropertiesEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
SecurityPosture
| JSON representation |
|---|
{ "devicePosture": enum ( |
| Fields | |
|---|---|
devicePosture |
Device's security posture value. |
postureDetails[] |
Additional details regarding the security posture of the device. |
PostureDetail
| JSON representation |
|---|
{ "securityRisk": enum ( |
| Fields | |
|---|---|
securityRisk |
A specific security risk that negatively affects the security posture of the device. |
advice[] |
Corresponding admin-facing advice to mitigate this security risk and improve the security posture of the device. |
CommonCriteriaModeInfo
| JSON representation |
|---|
{ "commonCriteriaModeStatus": enum ( |
| Fields | |
|---|---|
commonCriteriaModeStatus |
Whether Common Criteria Mode is enabled. |
policySignatureVerificationStatus |
Output only. The status of policy signature verification. |
PasswordRequirements
| JSON representation |
|---|
{ "passwordMinimumLength": integer, "passwordMinimumLetters": integer, "passwordMinimumLowerCase": integer, "passwordMinimumNonLetter": integer, "passwordMinimumNumeric": integer, "passwordMinimumSymbols": integer, "passwordMinimumUpperCase": integer, "passwordQuality": enum ( |
| Fields | |
|---|---|
passwordMinimumLength |
The minimum allowed password length. A value of 0 means there is no restriction. Only enforced when |
passwordMinimumLetters |
Minimum number of letters required in the password. Only enforced when |
passwordMinimumLowerCase |
Minimum number of lower case letters required in the password. Only enforced when |
passwordMinimumNonLetter |
Minimum number of non-letter characters (numerical digits or symbols) required in the password. Only enforced when |
passwordMinimumNumeric |
Minimum number of numerical digits required in the password. Only enforced when |
passwordMinimumSymbols |
Minimum number of symbols required in the password. Only enforced when |
passwordMinimumUpperCase |
Minimum number of upper case letters required in the password. Only enforced when |
passwordQuality |
The required password quality. |
passwordHistoryLength |
The length of the password history. After setting this field, the user won't be able to enter a new password that is the same as any password in the history. A value of 0 means there is no restriction. |
maximumFailedPasswordsForWipe |
Number of incorrect device-unlock passwords that can be entered before a device is wiped. A value of 0 means there is no restriction. |
passwordExpirationTimeout |
Password expiration timeout. A duration in seconds with up to nine fractional digits, ending with ' |
passwordScope |
The scope that the password requirement applies to. |
requirePasswordUnlock |
The length of time after a device or work profile is unlocked using a strong form of authentication (password, PIN, pattern) that it can be unlocked using any other authentication method (e.g. fingerprint, trust agents, face). After the specified time period elapses, only strong forms of authentication can be used to unlock the device or work profile. |
unifiedLockSettings |
Controls whether a unified lock is allowed for the device and the work profile, on devices running Android 9 and above with a work profile. This can be set only if |
Duration
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years |
nanos |
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
DpcMigrationInfo
| JSON representation |
|---|
{ "previousDpc": string, "additionalData": string } |
| Fields | |
|---|---|
previousDpc |
Output only. If this device was migrated from another DPC, this is its package name. Not populated otherwise. |
additionalData |
Output only. If this device was migrated from another DPC, the |
DefaultApplicationInfo
| JSON representation |
|---|
{ "defaultApplicationType": enum ( |
| Fields | |
|---|---|
defaultApplicationType |
Output only. The default application type. |
packageName |
Output only. The package name of the current default application. |
defaultApplicationSettingAttempts[] |
Output only. Details on the default application setting attempts, in the same order as listed in |
DefaultApplicationSettingAttempt
| JSON representation |
|---|
{
"packageName": string,
"attemptOutcome": enum ( |
| Fields | |
|---|---|
packageName |
Output only. The package name of the attempted application. |
attemptOutcome |
Output only. The outcome of setting the app as the default. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌