The ID of the devices need to be identified to be able to apply operations on specific devices. Follow the steps given below to retrieve the device ID:
Execute the following command to retrieve the ID of the devices registered under a specific user:
Localtabgroup Localtab title cURL Code Block curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <OAUTH_2.0_ACCESS_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS:PORT>/api/mdmdevice-adminmgt/usersv1.0/devices?usernameuser=<USERNAME>
- For more information on how to generate the OAuth2 Access Token, see Generating the OAuth 2.0 Access Token.
- By default,
<EMM_HOST>
islocalhost.
However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT>
has been set to 9443. However, if the port offset has been incremented byn
, the default port value needs to be incremented byn
. - Provide the
<USERNAME>
of the user you wish to get the details of the registered device/s.
Example:
Code Block curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer e8975ad01fc5635dd7cabedefe00a9d7" -k -v https://localhost:9443/api/mdmdevice-adminmgt/usersv1.0/devices?usernameuser=admin
Localtab title Sample output The sample output of the given example:
Code Block [ { "id": 1, "type": "windows", "deviceIdentifier": "urn:uuid:TGSFB4g2-1456-7256-N826-163AFC462836", "enrolmentInfo": { "id": 1, "dateOfEnrolment": 1447936036918, "dateOfLastUpdate": 1447942337093, "ownership": "BYOD", "status": "ACTIVE", "owner": "admin" }, "properties": [ { "name": "IMEI", "value": "355768067631021" }, { "name": "IMSI", "value": "" }, { "name": "DEVICE_MODEL", "value": "Lumia 630" }, { "name": "OS_VERSION" }, { "name": "VENDOR", "value": "NOKIA" }, { "name": "LATITUDE" }, { "name": "LONGITUDE" }, { "name": "SERIAL" }, { "name": "DEVICE_INFO", "value": "480x800" }, { "name": "CHANNEL_URI" }, { "name": "DEVICE_NAME" }, { "name": "MAC_ADDRESS", "value": "D0-92-9E-8A-6E-28" } ] }, { "id": 3, "name": "titan_umts", "type": "android", "description": "titan_umts", "deviceIdentifier": "156928253613935", "enrolmentInfo": { "id": 3, "dateOfEnrolment": 1448292387532, "dateOfLastUpdate": 1448293906995, "ownership": "COPE", "status": "ACTIVE", "owner": "admin" }, "properties": [ { "name": "IMEI", "value": "359298055243973" }, { "name": "IMSI", "value": "413025702363929" }, { "name": "DEVICE_MODEL", "value": "XT1064" }, { "name": "OS_VERSION", "value": "5.0.2" }, { "name": "VENDOR", "value": "motorola" }, { "name": "LATITUDE" }, { "name": "LONGITUDE" }, { "name": "SERIAL" }, { "name": "DEVICE_INFO", "value": "[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"5.0.2\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"70\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.47\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.47\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]" }, { "name": "DEVICE
The ID of the devices registered under a specific user can be identified by searching for the property
deviceIdentifier
, in the output you receive when you run the command given under step 1.
Example: The device ID of the devices registered under admin.Code Block "deviceIdentifier": "urn:uuid:TGSFB4g2-1456-7256-N826-163AFC462836" "deviceIdentifier": "156928253613935"