I have a 2018 13" MacBook Pro that after wiping and re-installing the os (Big Sur), gives the following error at the remote management screen.
"an error occurred while obtaining automatic configuration settings"
Now, we ARE using DEP (or whatever we are supposed to call it this week). I have 5 other machines RIGHT next to it that are all completing this process without error. The machine is hardwired on a verified good port/cable (ie: JUST completed another machine using this station. I have no idea where to begin. Apple told us it's our configuration and left it at that.
I actually had this same issue yesterday. I found this Jamf nation post about it (https://www.jamf.com/jamf-nation/discussions/38102/an-error-occurred-while-obtaining-automatic-configuration-settings-pre-stage).
The post mentioned that a PRAM/NVRAM reset would resolve the issue, I gave that a try and that resolved my issue as well.