Page Summary
-
Updating a device policy requires authorization.
-
To properly enforce the policy, you need to prevent unmanaged accounts from accessing Google Play by setting the
allowed_accountsin the managed configuration for the Google Play package. -
The HTTP request for updating a device policy is
PUT https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/users/userId/devices/deviceId. -
The request requires authorization with the
https://www.googleapis.com/auth/androidenterprisescope. -
A successful request returns a Devices resource in the response body.
Updates the device policy.
To ensure the policy is properly enforced, you need to prevent unmanaged
accounts from accessing Google Play by setting the allowed_accounts
in the managed configuration for the Google
Play package. See restrict
accounts in Google Play
.
Request
HTTP request
PUT https://www.googleapis.com/androidenterprise/v1/enterprises/ enterpriseId /users/ userId /devices/ deviceId
Parameters
deviceId
string
enterpriseId
string
userId
string
updateMask
string
When set in a query parameter, this field should be specified as
updateMask=<field1>,<field2>,...
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 a Devices resource .
Response
If successful, this method returns a Devices resource in the response body.

