2

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.

Patrick
  • 2,044
  • 1
  • 25
  • 44
Raj
  • 735
  • 1
  • 7
  • 24

2 Answers2

1

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:

  • I'm trying to do the same thing, with x509 attestation. The cert stuff is okay, and I see where IoTCentral shows the Scope. what I can't find is the provisioning host. – lordbah Jun 14 '19 at 20:32
  • Apparently global.azure-devices-provisioning.net is what I was looking for. Never found where MS said that but I saw other people's code on the web. – lordbah Jun 17 '19 at 15:24
1

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 }
};
George Trifonov
  • 1,971
  • 17
  • 20