macOS 12.3 changes
Apparently in macOS 12.3 the DEP records are stored somewhere else:
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileObtained
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
/private/var/db/ConfigurationProfiles/Settings/.profilesFetchTimerCheck
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
/private/var/db/ConfigurationProfiles/Settings/.deviceConfigurationBits
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigTimerCheck
Some logic needs to be updated
I've recently been looking into the location of .cloudConfigRecordFound. In every OS version from 10.13 up, I find that it's stored at /private/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound.
current cCRF: /private/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
old cCRF: /private/var/db/ConfigurationProfiles/.cloudConfigRecordFound
I checked our Macs for files at both the current and old paths. Only about 1 in 780 machines have a file at the old path. All but 1 with old cCRF have a current cCRF as well.
/private/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound OS versions checked: 10.13.6 (17G11023) 10.14.6 (18G2022) 10.15.7 (19H2026) 11.7.1 12.2 12.5.1 12.6.1 13.0.1
/private/var/db/ConfigurationProfiles/.cloudConfigRecordFound 10.12.6 (16G29) 10.12.6 (16G2136)