2
votes

How to provision devices into IoT Central using DPS? Documentation says that there is an advanced option available to provision device directly to IoT central. But when i check in DPS application, there is no option to link to IOT contral.

I am new to IOT development.

2

2 Answers

1
votes

Azure IoT Central provisions Device Provisioning Service (DPS) when an application is created. The details that will be required to provision your devices can all be retrieved from within your Azure IoT Central application. Based on your use-case, follow these instructions to connect the devices to IoT Central:

1
votes

You can look into following example - https://github.com/Azure/iotc-device-bridge/blob/master/IoTCIntegration/lib/engine.js line 119

const sasToken = await getRegistrationSasToken(context, deviceId);

const registrationOptions = {
    url: `https://${registrationHost}/${context.idScope}/registrations/${deviceId}/register?api-version=${registrationApiVersion}`,
    method: 'PUT',
    json: true,
    headers: { Authorization: sasToken },
    body: { registrationId: deviceId }
};