If a device is enrolled via DEP, when the MDM server changes (eg: migrating from another MDM solution into Fleet) the device needs to re-fetch the enrollment profile from Apple's servers.
Generally the flow looks like:
The IT admin creates a new DEP enrollment profile in Fleet
The host needs to run sudo profiles renew --type enrollment to fetch the new enrollment profile
We're trying to make the last step there to happen automatically without user action, for this Orbit is going to run sudo profiles renew --type enrollment, when the Fleet server asks.
Problem
If a device is enrolled via DEP, when the MDM server changes (eg: migrating from another MDM solution into Fleet) the device needs to re-fetch the enrollment profile from Apple's servers.
Generally the flow looks like:
sudo profiles renew --type enrollment
to fetch the new enrollment profileWe're trying to make the last step there to happen automatically without user action, for this Orbit is going to run
sudo profiles renew --type enrollment
, when the Fleet server asks.Related
Parent epic
API work
Requirements
[x] use the existing
/api/fleet/orbit/config
to detect that it needs to run the commandnotifications.renew_enrollment_profile
field in the response is set to true[x] shell out and run
sudo profiles renew --type enrollment
(sudo
might not actually be needed as orbit runs as root)