Seeking help for MDM activation lock issue

We have encountered an issue while developing our own Apple MDM solution. The issue occurs in the activation lock scenario.

We have implemented the activation and deactivation of the activation lock feature in accordance with the following documentation. 1:https://developer.apple.com/documentation/devicemanagement/activation_lock_a_device 2:https://developer.apple.com/documentation/devicemanagement/device_assignment/activation_lock_a_device/creating_and_using_bypass_codes#3734453

Activationlock

Request URI : https://mdmenrollment.apple.com/device/activationlock

Request Method : POST

Request Headers : [Accept:"text/plain, application/json, application/*+json, /", X-ADM-Auth-Session:"1723449441118O1O649496FAD285FDC77565EC075E770547O90695212BB76419F8E43B2F68BE7A6C6O67033512O11Op1OA0EA85747E70D2D6941C4F6662166CAF22C2193COC298C61ECC7B9E9C14EB2A20305F7E41", X-Server-Protocol-Version:"3", Content-Type:"application/json", Content-Length:"133"]

Request Body : {"device":"K2LP4HQXJ4","escrow_key":"QRV7D-JPPMQ-Z90N-1VN8-L1PN-45Q2","lost_message":"xxxxx"}

Response : {"serial_number":"K2LP4HQXJ4","response_status":"SUCCESS"}

escrowKeyUnlock

Request URI : https://deviceservices-external.apple.com/deviceservicesworkers/escrowKeyUnlock?serial=K2LP4HQXJ4&imei=357174298879232&meid=35717429887923&productType=iPhone14,2

Request Method : POST

Request Headers : [Accept:"text/plain, application/json, application/*+json, /", Content-Type:"application/x-www-form-urlencoded", Content-Length:"189"]

Request Body : orgName=xxxxx&guid=xxxxx&escrowKey=QRV7D-JPPMQ-Z90N-1VN8-L1PN-45Q2

Response : 404 <?xml version="1.0" encoding="UTF-8"?><ns:escrowKeyDeviceServicesResponse version="1" xmlns:ns="http://www.apple.com/cds/mdmescrowKeyDeviceServices/xml"><error code="1002" message="com.apple.cds.cyclops.mdm.MDMServiceException: No entry found for device K2LP4HQXJ4:357174298879232:35717429887923"/></ns:escrowKeyDeviceServicesResponse>

Who can help me check if there are any errors in the way I'm calling these two APIs, and how to correct them?

imei2 is missing in querystring

Seeking help for MDM activation lock issue
 
 
Q