Automatically register devices that use SAS tokens:
Step 1: Obtain the group primary key
1. Copy the group primary key from the SAS-IoT-Devices enrollment group:

Step 2: Generate device SAS Keys.
2. Use the az iot central device compute-device-key command to generate the device SAS keys. Use the group primary key from the previous step.
Step 3: Flash unique credentials to the devices.
3. As an OEM, flash each device with the device ID, the generated device SAS key, and the application ID scope value. The device code should also send the model ID of the device model it implements.
Step 4: Connect the devices to IoT Central
4. When you switch on a device, it first connects to DPS to retrieve its IoT Central registration information.
5. The device uses the information from DPS to connect to, and register with, your IoT Central application.
Step 5: Associate the devices to a template and approve the connections.
The IoT Central application uses the model ID sent by the device to associate the registered device with a device template.
Reference:
https://docs.microsoft.com/en-us/azure/iot-central/core/concepts-get-connected