1. Try Manual Removal
Sometimes the profile isn't locked. Try this first:
iPhone/iPad: Go to Settings > General > VPN & Device Management. Tap the MDM profile and check for a "Remove Profile" button.
Mac: Go to System Settings > Privacy & Security > Profiles. Select the MDM profile and click the "-" (minus) button.
2. Factory Reset (DFU Restore)
If manual removal is blocked, you must completely wipe the device.
Important: Do not restore a full backup, or the MDM profile might return. Set up the device as "New" and sync only essential data (like photos and contacts) from iCloud.
3. The ABM (Apple Business Manager) Issue
If the device's serial number is registered in a corporate Apple account, the MDM lock will reinstall automatically after a reset.
Solution: Only the account owner can release the serial number. Alternatively, you can contact Apple Support with your original proof of purchase to request a removal