Request: Bypassing removal of DEP Enrolled device (MacBook)

mrdoody

Newbie
Joined
Jan 22, 2024
Messages
22
Reaction score
8
Hi,

I have a corporate enrolled Macbook device, it's enrolled in auto-mdm(DEP Enrolled), as far as I've researched on the internet, this can't be removed.

Is there a method to bypass this enrollment lock or am I screwed trying to use this device.

Another question I had in mind is where this dep-enrollment profile is stored, if its in the hard-drive, then a hard-drive change would be able to solve this issue, right?

mrdoody
 
I seem to have found a solution, all my tests indiciate that this method works.

What I have tested so far
1. Erased and reinstalled
2. Checked for profiles / mdm in settings
3. Run
Code:
sudo profiles show -type enrollment
with the output Error fetching Device Enrollment configuration: Client is not DEP enabled.


Instructions
Non-removable MDM profiles cannot officially removed without doing a full system wipe. This is a problem when you restore a system from Time Machine after you enrolled it into the MDM, as the MDM will break, leaving you unable to re-enroll the machine.

Here's how to remove a non-removable MDM profile​

  1. Boot the Mac into Recovery Mode (hold down command+R during startup).
  2. Go to the Utilities menu and open Terminal and type: csrutil disable. This will disable SIP (System Integrity Protection).
  3. Reboot into the OS.
  4. Open the integrated terminal and type:
Code:
cd /var/db/ConfigurationProfiles
rm -rf *
mkdir Settings
touch Settings/.profilesAreInstalled

  1. Reboot.
  2. Boot the Mac into Recovery Mode (hold down command+R during startup).
  3. Go to the Utilities menu and open Terminal and type: csrutil enable. This will re-enable SIP.
  4. Reboot into the OS.
The profile will be now removed and you will be able to re-enroll the Mac to your MDM.

Source:
https://graffino.com/til/remove-a-non-removable-mdm-profile-from-macos-without-a-complete-wipe

Questions that pops up to mind
How is this going to look on the managed platform end? (Either if that's ABM(Apple Business Manager) and/or JAMF or some similar MDM)

Will this device just not re-register because I've deleted the ConfigurationProfiles DB entry?

Is this entry the only area in which profiles are stored /var/db/ConfigurationProfiles, is there anything else to stay aware of?
 
Back
Top