macOS: How to Clear Cached MDM Enrollment Settings While in Setup Assistant

If you change a computer’s MDM configuration in Apple School Manager (ASM) or Apple Business Manager (ABM) after a computer has already started Setup Assistant, then the computer may be in a state where it is trying to enroll to a previously configured MDM server before you changed it in ASM/ABM. This may result in the computer giving a 500 MDM server connection error when you try to proceed past the “Remote Management” screen in Setup Assistant. Big Sur seems to not try to refresh this cached MDM info once it pulls it down for the first time. Not sure how later macOS versions behave in Setup Assistant. Big Sur and later versions of macOS make it a non-trivial process to delete the MDM cached info. For Big Sur and later do the following to clear out the Setup Assistant cached MDM enrollment settings:

  1. Boot the computer into Recovery Mode and then start the Terminal app while in Recovery Mode.
  2. In Terminal run the command: csrutil disable
  3. Reboot the computer and go into Recovery Mode again and launch the Terminal app.
  4. Delete the cached MDM enrollment data by running the following command: rm “/Volumes/Hard Drive – Data/private/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound”
    • Change “Hard Drive – Data” to match the name of the data partition of the computer you are working on. It will be whatever you named the OS hard drive partition with “– Data” appended to the end of the name.
  5. Run the Terminal command: csrutil enable
  6. Reboot back into Setup Assistant and the cached MDM settings should now be gone and the computer will pull the latest settings from ASM/ABM again.

Leave a Reply