Updating the ServerURL in an existing MDM profile on iOS device
I am writing an iOS MDM server and wanted to update the ServerURL property in the MDM payload in an already enrolled iOS device.
Can I update it without removing the MDM profile first?
When I try to install the profile again over an existing one I get an error: 4001 - Profile Failed to Install 4015 - Remove the profile “XXX” before installing this profile.
You are getting the 4001 error because you are trying to change the server URLs.
The MDM server can replace the configuration profile which contains the MDM payload only if:
- The new profile also contains a MDM payload, and
- The URLs of the server in the new payload are the same as the old payload, and
- The topics are the same, and
- The new payload contains no new access rights