Using version 2.0.1 of the EMM, I am using the console API to programtically add the user to an existing policy and publish that policy to the device. Reading the API docs, I believe the order to be the following:
GET (/mdm-admin/policies/{id}) <--- This is working.
Update the policy JSON with the registered device owning user.
PUT (/mdm-admin/policies/{id}) <--- This works as well.
PUT (/mdm-admin/policies/apply-changes) <--- API returns 200
The following issues come to the forefront.
1) The Policy pack is never pushed to the device. 2) The restriction placed into the policy disappears from the policy.
Am I missing a step in the process to force that push to occur, and should I be pushing the entire policy or just the changed list of users?