There are a couple of reasons you might receive the Invalid Profile error while enrolling Apple devices. This article lists a few of the causes and solutions to help with troubleshooting.
Problem: Apple Enrollment Profile needs to be refreshed.
Description: Apple purges old enrollment profiles from their servers every now and then.
Solution: In Control Tower > Settings > Apple DEP > click on the name of the DEP account > DEP Tab > Change one setting in the Setup Assistant Options > click Update DEP Settings at the bottom of the tab. Wait for the sync time to change.
If you had any devices that you tried to enroll and received the download profile failed, you will need to hook these devices to iTunes or Configurator and perform a "Restore as New". https://support.apple.com/en-us/HT201252