Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delivering MDM DeviceLock Payload

We were able to get an response with Status as Idle after send the first payload as mdm:. Now we want to send a simple device lock payload. we followed the exact same process to send the payload but the response returned was blank.

We are following the certificate use as follows: 1. On the MDM server, To send mdm commands we use MDM Vendors APNS certificate with identifier as com.apple.mgmt.myapp.(This identifier is set as topic in configuration profile). 2. In the configuration profile, we are setting the credentials as the p12 file which is returned by the MDM Client.

I am getting the below error..: MC|Failed to parse profile data. Error:

    NSError 0x1c58c2f0:
    Desc   : Invalid Profile
    US Desc: Invalid Profile
    Domain : MCProfileErrorDomain
    Code   : 1000
    Type   : MCFatalError


    <Warning>: MDM|Command Status: Error
    Error: NSError 0x1c58c2f0:
    Desc   : Invalid Profile
    US Desc: Invalid Profile
    Domain : MCProfileErrorDomain
    Code   : 1000
    Type   : MCFatalError
like image 507
Manmay Avatar asked Mar 02 '12 13:03

Manmay


2 Answers

You do not send the device lock profile using APNS. The device 'phones home' after it receives the MDM payload via APNS and your server sends back XML (NOT JSON!) to the device containing the device lock command.

like image 133
Abstractec Avatar answered Sep 30 '22 16:09

Abstractec


The payload should be Base64 encoded of *.mobileconfig file content, with the top level 'dict' node.

The actual xml sent to device is defined in the iOS MDM protocol reference. The command type is 'InstallProfile'

like image 44
vetti Avatar answered Sep 30 '22 15:09

vetti