[ISSUE] Android Management API - Unable to remove the password from the device
[REQUEST]
POST https://androidmanagement.googleapis.com/v1/enterprises/LC04k33pjm/devices/32931cb718c4bbcf:issueCommand?key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json
{
"type": "RESET_PASSWORD"
}
[RESPONSE]
HTTP/1.1 200
cache-control: private
content-encoding: gzip
content-length: 263
content-type: application/json; charset=UTF-8
date: Tue, 07 May 2024 15:46:32 GMT
server: ESF
vary: Origin, X-Origin, Referer
{
"name": "enterprises/LC04k33pjm/devices/32931cb718c4bbcf/operations/1715096792085",
"metadata": {
"@type": "type.googleapis.com/google.android.devicemanagement.v1.Command",
"type": "RESET_PASSWORD",
"createTime": "2024-05-07T15:46:32.085Z",
"duration": "600s",
"userName": "enterprises/LC04k33pjm/users/114476752020549114690"
}
}
Upon checking the status of the issued command "enterprises/LC04k33pjm/devices/32931cb718c4bbcf/operations/1715096792085" in operations, I received a response.
[REQUEST]
GET https://androidmanagement.googleapis.com/v1/enterprises/LC04k33pjm/devices/32931cb718c4bbcf/operations/1715096792085?key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
[RESPONSE]
HTTP/1.1 200
cache-control: private
content-encoding: gzip
content-length: 304
content-type: application/json; charset=UTF-8
date: Tue, 07 May 2024 15:51:33 GMT
server: ESF
vary: Origin, X-Origin, Referer
{
"name": "enterprises/LC04k33pjm/devices/32931cb718c4bbcf/operations/1715096792085",
"metadata": {
"@type": "type.googleapis.com/google.android.devicemanagement.v1.Command",
"type": "RESET_PASSWORD",
"createTime": "2024-05-07T15:46:32.085Z",
"duration": "600s",
"errorCode": "INVALID_VALUE",
"userName": "enterprises/LC04k33pjm/users/114476752020549114690"
},
"done": true,
"error": {
"code": 3
}
}
I'm uncertain which invalid value I inputted into the parameters. Moreover, the LOCK or REBOOT command works correctly without errors for the same device.
The policy associated with this device.
[REQUEST]
GET https://androidmanagement.googleapis.com/v1/enterprises/LC04k33pjm/policies/8f600ee4-0970-4d69-b916-e4d718e25b8e?key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
[RESPONSE]
HTTP/1.1 200
cache-control: private
content-encoding: gzip
content-length: 118
content-type: application/json; charset=UTF-8
date: Tue, 07 May 2024 16:14:04 GMT
server: ESF
vary: Origin, X-Origin, Referer
{
"name": "enterprises/LC04k33pjm/policies/8f600ee4-0970-4d69-b916-e4d718e25b8e",
"version": "22"
}
