Devices: 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.


HTTP request



Parameter name Value Description
Path parameters
deviceId string The ID of the device.
enterpriseId string The ID of the enterprise.
userId string The ID of the user.


This request requires authorization with the following scope:


For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "androidenterprise#deviceState",
  "accountState": string
Property name Value Description Notes
accountState string The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state.

Acceptable values are:
  • "disabled"
  • "enabled"
kind string