Method: devices.deviceUsers.lookup

Looks up resource names of the DeviceUsers associated with the caller's credentials, as well as the properties provided in the request.

This method must be called with end-user credentials with the scope: https://www.googleapis.com/auth/cloud-identity.devices.lookup

If multiple properties are provided, only DeviceUsers having all of these properties are considered as matches - i.e. the query behaves like an AND.

Different platforms require different amounts of information from the caller to ensure that the DeviceUser is uniquely identified.

  • iOS: No properties need to be passed, the caller's credentials are sufficient to identify the corresponding DeviceUser.
  • Android: Specifying the 'androidId' field is required.
  • Desktop: Specifying the 'rawResourceId' field is required.

HTTP request

GET https://cloudidentity.googleapis.com/v1beta1/{parent=devices/*/deviceUsers}:lookup

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Must be set to "devices/-/deviceUsers" to search across all DeviceUser belonging to the user.

Query parameters

Parameters
pageSize

integer

The maximum number of DeviceUsers to return. If unspecified, at most 20 DeviceUsers will be returned. The maximum value is 20; values above 20 will be coerced to 20.

pageToken

string

A page token, received from a previous LookupDeviceUsers call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to LookupDeviceUsers must match the call that provided the page token.

androidId

string

Android Id returned by Settings.Secure#ANDROID_ID.

rawResourceId

string

Raw Resource Id used by Google Endpoint Verification.

If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files.

Mac: ~/.secureConnect/context_aware_config.json Windows: C:\Users\%USERPROFILE%.secureConnect\context_aware_config.json Linux: ~/.secureConnect/context_aware_config.json

userId

string

The user whose DeviceUser's resource name will be fetched. Must be set to 'me' to fetch the DeviceUser's resource name for the calling user.

Request body

The request body must be empty.

Response body

Response containing resource names of the DeviceUsers associated with the caller's credentials.

If successful, the response body contains data with the following structure:

JSON representation
{
  "names": [
    string
  ],
  "customer": string,
  "nextPageToken": string
}
Fields
names[]

string

Resource names of the DeviceUsers in the format: devices/{deviceId}/deviceUsers/{user_resource_id}, where deviceId is the unique ID assigned to a Device and user_resource_id is the unique user ID

customer

string

The customer Id that may be passed back to other Devices API methods such as List, Get, etc.

nextPageToken

string

Token to retrieve the next page of results. Empty if there are no more results.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-identity.devices.lookup

For more information, see the Authentication Overview.