Managed iOS devices might lose connection with the MDM server due to various reasons like
When the device loses connection with the MDM server, no action performed on the server will reach the device which essentially makes the device unmanaged. Follow the steps given below to recover such unmanaged devices mannually
iOS Devices
To recover these device, we need to use Apple Configurator on the Mac machine that is already trusted by the mobile device
The first step will be to try and restore connection with the MDM server by pushing a wifi profile to the device using Apple Configurator:
If the device is still unable to connect to the MDM server, we can manually remove the device from management and re-enroll the device
Once the profile is removed the device will be unmanaged, you can re-enroll the device for management.
In case you have applied profiles on the device that restrict the device from connecting to other devices, then the device will have to be reset by putting it in Recovery Mode.
Android Devices
To recover the device, Device Administrator must be revoked from the device, this can be done by following the steps given below:
The device can be re-enrolled once the server connectivity issues have been fixed.