Page Summary
-
This method allows setting a device's access to Google services as enabled or disabled.
-
The device state change is only effective if enforcing EMM policies is enabled in the Google Admin Console.
-
This functionality is supported only for Google-managed users.
-
The request requires authorization and involves specifying the device, enterprise, and user IDs in the path parameters.
-
The request body specifies the desired account state, which can be either "enabled" or "disabled".
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.
Request
HTTP request
PUT https://www.googleapis.com/androidenterprise/v1/enterprises/ enterpriseId /users/ userId /devices/ deviceId /state
Parameters
deviceId
string
enterpriseId
string
userId
string
Authorization
This request requires authorization with the following scope:
| Scope |
|---|
https://www.googleapis.com/auth/androidenterprise
|
For more information, see the authentication and authorization page.
Request body
In the request body, supply data with the following structure:
{ "kind": "androidenterprise#deviceState", "accountState": string }
accountState
string
Acceptable values are:
- "
disabled" - "
enabled"
kind
string
Response
If successful, this method returns a response body with the following structure:
{ "kind": "androidenterprise#deviceState", "accountState": string }
accountState
string
Acceptable values are:
- "
disabled" - "
enabled"
kind
string

