Class DevicesResource
The "devices" collection of methods.
Inherited Members
Namespace: Google.Apis.AndroidEnterprise.v1
Assembly: Google.Apis.AndroidEnterprise.v1.dll
Syntax
public class DevicesResource
Constructors
DevicesResource(IClientService)
Constructs a new resource.
Declaration
public DevicesResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
ForceReportUpload(string, string, string)
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. If you exceed the quota, then the Google Play EMM API returns HTTP 429 Too Many Requests.
Declaration
public virtual DevicesResource.ForceReportUploadRequest ForceReportUpload(string enterpriseId, string userId, string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
| string | deviceId | The ID of the device. |
Returns
| Type | Description |
|---|---|
| DevicesResource.ForceReportUploadRequest |
Get(string, string, string)
Retrieves the details of a device.
Declaration
public virtual DevicesResource.GetRequest Get(string enterpriseId, string userId, string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
| string | deviceId | The ID of the device. |
Returns
| Type | Description |
|---|---|
| DevicesResource.GetRequest |
GetState(string, string, string)
Checks if a device can access Google apps and services for a user. Returns whether access is "enabled" or "disabled". A "disabled" state prevents the user's Managed Google Account on the device from successfully authenticating with Google. This blocks access to most Google applications and services, including Google Play, as the device cannot prove its entitlement to access them. New devices default to "disabled". Important: Enforcement of this state depends on the following conditions: * The user must be a managed google account. * The enterprise must be a managed google domain. * Third-party Android mobile management must be active in the Google Admin Console for the user's Organizational Unit. If these conditions aren't met, access may still be possible even in a "disabled" state.
Declaration
public virtual DevicesResource.GetStateRequest GetState(string enterpriseId, string userId, string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
| string | deviceId | The ID of the device. |
Returns
| Type | Description |
|---|---|
| DevicesResource.GetStateRequest |
List(string, string)
Retrieves the IDs of all of a user's devices.
Declaration
public virtual DevicesResource.ListRequest List(string enterpriseId, string userId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
Returns
| Type | Description |
|---|---|
| DevicesResource.ListRequest |
SetState(DeviceState, string, string, string)
Sets whether a device's access to Google services (including Google Play) is enabled or disabled for the specified user. Setting the state to "enabled" allows the Google Account to access Google services, while "disabled" blocks access by preventing OAuth token issuance. Preconditions for Enforcement: 1. This setting is only effective for Google-managed users. 2. The enterprise must be linked to a Google Managed Domain. 3. Enforcement requires third-party Android mobile management to be enabled within the Google Admin Console for the user's Organizational Unit. If these preconditions are not met, changes to this state may be ignored.
Declaration
public virtual DevicesResource.SetStateRequest SetState(DeviceState body, string enterpriseId, string userId, string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceState | body | The body of the request. |
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
| string | deviceId | The ID of the device. |
Returns
| Type | Description |
|---|---|
| DevicesResource.SetStateRequest |
Update(Device, string, string, string)
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. When provisioning a new device, you should set the device policy using this method before adding the managed Google Play Account to the device, otherwise the policy will not be applied for a short period of time after adding the account to the device.
Declaration
public virtual DevicesResource.UpdateRequest Update(Device body, string enterpriseId, string userId, string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| Device | body | The body of the request. |
| string | enterpriseId | The ID of the enterprise. |
| string | userId | The ID of the user. |
| string | deviceId | The ID of the device. |
Returns
| Type | Description |
|---|---|
| DevicesResource.UpdateRequest |