est way for that is using the Apple Device Enrollment Program (DEP) in case you are talking about iOS devices:
https://documentation.meraki.com/SM/Device_Enrollment/Enrolling_and_Supervising_iOS_Devices_using_Ap...
For Android, there is a specifi setup routine that the user can use.
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.