Page Summary
-
A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
-
The resource representation includes details about the device's identification, management type, enforced policy, and latest report.
-
The policy enforced on the device can control aspects like app auto-update behavior, product availability, auto-install policies, and maintenance windows.
-
The device report provides information about the latest app states on the device as set by managed apps.
-
Various methods are available for interacting with device resources, including retrieving details, setting state, listing devices, forcing report uploads, and updating policies.
For a list of methods for this resource, see the end of this page.
Resource representations
A Devices resource represents a mobile device managed by the EMM and belonging to a specific enterprise user.
{ "kind" : "androidenterprise#device" , "androidId" : string , "managementType" : string , "policy" : { "autoUpdatePolicy" : string , "productAvailabilityPolicy" : string , "productPolicy" : [ { "productId" : string , "tracks" : [ string ], "trackIds" : [ string ], "managedConfiguration" : { "kind" : string , "productId" : string , "managedProperty" : [ { "key" : string , "valueBool" : boolean , "valueInteger" : integer , "valueString" : string , "valueStringArray" : [ string ], "valueBundle" : { "managedProperty" : [ ( ManagedProperty ) ] } , "valueBundleArray" : [ { "managedProperty" : [ ( ManagedProperty ) ] } ] } ], "configurationVariables" : { "kind" : "androidenterprise#configurationVariables" , "mcmId" : string , "variableSet" : [ { "kind" : "androidenterprise#variableSet" , "placeholder" : string , "userValue" : string } ] } } , "autoInstallPolicy" : { "autoInstallMode" : string , "autoInstallPriority" : integer , "autoInstallConstraint" : [ { "networkTypeConstraint" : string , "chargingStateConstraint" : string , "deviceIdleStateConstraint" : string } ], "minimumVersionCode" : integer } , "autoUpdateMode" : string , "enterpriseAuthenticationAppLinkConfigs" : [ { "uri" : string } ] } ], "maintenanceWindow" : { "startTimeAfterMidnightMs" : long , "durationMs" : long } , "deviceReportPolicy" : string , "policyId" : string } , "report" : { "lastUpdatedTimestampMillis" : long , "appState" : [ { "packageName" : string , "keyedAppState" : [ { "key" : string , "stateTimestampMillis" : long , "severity" : string , "message" : string , "data" : string } ] } ] } , "latestBuildFingerprint" : string , "sdkVersion" : integer , "maker" : string , "model" : string , "device" : string , "product" : string , "retailBrand" : string }
androidId
string
"123456789abcdef0"
.device
string
android.os.Build.DEVICE
. (field named "device" per logs/wireless/android/android_checkin.proto)kind
string
latestBuildFingerprint
string
managementType
string
Possible values include:
- "
managedDevice", a device that has the EMM's device policy controller (DPC) as the device owner. - "
managedProfile", a device that has a profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC. - "
containerApp", no longer used (deprecated). - "
unmanagedProfile", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use managed Google Play, but the profile is itself not owned by a DPC.
Acceptable values are:
- "
containerApp" - "
managedDevice" - "
managedProfile" - "
unmanagedProfile"
policy
nested object
policy.
autoUpdatePolicy
string
Recommended alternative:
autoUpdateMode
which is set per app, provides greater flexibility around update frequency.When
autoUpdateMode
is set to AUTO_UPDATE_POSTPONED
or AUTO_UPDATE_HIGH_PRIORITY
, autoUpdatePolicy
has no effect. -
choiceToTheUserallows the device's user to configure the app update policy. -
alwaysenables auto updates. -
neverdisables auto updates. -
wifiOnlyenables auto updates only when the device is connected to wifi.
Acceptable values are:
- "
always" - "
choiceToTheUser" - "
never" - "
wifiOnly"
policy.
deviceReportPolicy
string
Acceptable values are:
- "
deviceReportDisabled" - "
deviceReportEnabled"
policy.
maintenanceWindow
nested object
policy.maintenanceWindow.
durationMs
long
policy.maintenanceWindow.
startTimeAfterMidnightMs
long
policy.
policyId
string
policy.
productAvailabilityPolicy
string
Acceptable values are:
- "
all" - "
whitelist"
policy.
productPolicy[]
list
productAvailabilityPolicy
needs to be set to WHITELIST
or ALL
for the product policies to be applied. policy.productPolicy[].
autoInstallPolicy
nested object
policy.productPolicy[].autoInstallPolicy.
autoInstallConstraint[]
list
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].
chargingStateConstraint
string
Acceptable values are:
- "
chargingNotRequired" - "
chargingRequired"
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].
deviceIdleStateConstraint
string
Acceptable values are:
- "
deviceIdleNotRequired" - "
deviceIdleRequired"
policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].
networkTypeConstraint
string
Acceptable values are:
- "
anyNetwork" - "
unmeteredNetwork"
policy.productPolicy[].autoInstallPolicy.
autoInstallMode
string
Acceptable values are:
- "
autoInstallOnce" - "
doNotAutoInstall" - "
forceAutoInstall"
policy.productPolicy[].autoInstallPolicy.
autoInstallPriority
integer
policy.productPolicy[].autoInstallPolicy.
minimumVersionCode
integer
policy.productPolicy[].
autoUpdateMode
string
autoUpdateMode
is used, it always takes precedence over the user's choice. So when a user makes changes to the device settings manually, these changes are ignored.Acceptable values are:
- "
autoUpdateDefault" - "
autoUpdateHighPriority" - "
autoUpdatePostponed"
policy.productPolicy[].
enterpriseAuthenticationAppLinkConfigs[]
list
policy.productPolicy[].enterpriseAuthenticationAppLinkConfigs[].
uri
string
policy.productPolicy[].
managedConfiguration
nested object
policy.productPolicy[].managedConfiguration.
configurationVariables
nested object
policy.productPolicy[].managedConfiguration.configurationVariables.
kind
string
policy.productPolicy[].managedConfiguration.configurationVariables.
mcmId
string
policy.productPolicy[].managedConfiguration.configurationVariables.
variableSet[]
list
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].
kind
string
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].
placeholder
string
policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].
userValue
string
policy.productPolicy[].managedConfiguration.
kind
string
policy.productPolicy[].managedConfiguration.
managedProperty[]
list
policy.productPolicy[].managedConfiguration.managedProperty[].
key
string
policy.productPolicy[].managedConfiguration.managedProperty[].
valueBool
boolean
policy.productPolicy[].managedConfiguration.managedProperty[].
valueBundle
nested object
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundle.
managedProperty[]
list
policy.productPolicy[].managedConfiguration.managedProperty[].
valueBundleArray[]
list
policy.productPolicy[].managedConfiguration.managedProperty[].valueBundleArray[].
managedProperty[]
list
policy.productPolicy[].managedConfiguration.managedProperty[].
valueInteger
integer
policy.productPolicy[].managedConfiguration.managedProperty[].
valueString
string
policy.productPolicy[].managedConfiguration.managedProperty[].
valueStringArray[]
list
policy.productPolicy[].managedConfiguration.
productId
string
policy.productPolicy[].
productId
string
"app:com.google.android.gm"
. policy.productPolicy[].
trackIds[]
list
trackIds
. The list of release tracks of a product can be obtained by calling Products.Get. policy.productPolicy[].
tracks[]
list
trackIds
instead.report
nested object
report.
appState[]
list
report.appState[].
keyedAppState[]
list
report.appState[].keyedAppState[].
data
string
report.appState[].keyedAppState[].
key
string
report.appState[].keyedAppState[].
severity
string
Acceptable values are:
- "
severityError" - "
severityInfo"
report.appState[].keyedAppState[].
stateTimestampMillis
long
report.appState[].
packageName
string
report.
lastUpdatedTimestampMillis
long
sdkVersion
integer
Methods
- forceReportUpload
- Uploads a report containing any changes in app states on the device since the last report was generated. You can call this method up to 3 times every 24 hours for a given device.
- get
- Retrieves the details of a device.
- getState
- Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
- list
- Retrieves the IDs of all of a user's devices.
- setState
- Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.
- update
- Updates the device policy.
To ensure the policy is properly enforced, you need to prevent unmanaged accounts from accessing Google Play by setting theallowed_accountsin the managed configuration for the Google Play package. See restrict accounts in Google Play .

