We are in the process of redeploying several older macs (but newer than 2012). The process is to erase them, install Sierra, enroll them in our DEP (since they were never originally in DEP), and then turn on the computer and our pre-enrollment config runs during Apple Setup.
So anyways, here's the weird issue we're occasionally running into: If we wipe the harddrive of one of the old macs and install Sierra, and then it connects to the internet in apple setup before its been added to DEP, there is no way to get our configuration profile to appear in Apple setup assistant unless we re-erase and re-install Sierra. It's almost like when Apple setup runs, something runs in the background to check if there is an MDM profile that needs to be applied, and if the answer is no, then it never checks again. Anybody have any experience with this or know of a workaround that's better than erasing and reinstalling Sierra? It's not a huge deal, but when doing 100+ macs it's annoying to do if one or two are missed when being added to DEP.
This seems to be normal behavior. Once a machine has gone through the DEP setup, it seems to cache the results (either it's part of DEP or not). Erasing and re-installing macOS resets this.
Not sure if this will help, but you can run DEP after setup so long as you're running macOS Sierra 10.12.4 or later. Apple added this new command:
sudo profiles -D
Thanks for the response and the tidbit about the new profiles command! Any idea where that cached result is stored? I figure it'd be easier to go in and delete that value instead of wiping + erasing each time.