Device register with multiple enrollment groups in the same DPS

Evandro Pomatti 11 Reputation points
2023-04-19T02:27:02.6433333+00:00

I have a central IoT DPS with two enrollment groups:

  1. Enrollment group A is edge-enabled for IoT Edge devices / Gateway.
  2. Enrollment group B is edge-disabled for non-edge devices.

Both enrollment groups are assigned to use the same root CA certificate.

User's image

I can't find a way to "target" my device registrations to a specific enrollment group, either via code or via configuration.

For example, in the python code below for my non-edge device, it keeps going through the edge-enabled group, which is incorrect.

How can I select or filter which enrollment group will receive my. Do I need to use separate root CAs?

async def main():
    x509 = X509(
        cert_file=os.getenv("X509_CERT_FILE"),
        key_file=os.getenv("X509_KEY_FILE"),
        pass_phrase=os.getenv("X509_PASS_PHRASE"),
    )

    ProvisioningDeviceClient.create_from_x509_certificate

    provisioning_device_client = ProvisioningDeviceClient.create_from_x509_certificate(
        provisioning_host=provisioning_host,
        registration_id=registration_id,
        id_scope=id_scope,
        x509=x509,
    )

    registration_result = await provisioning_device_client.register()
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,134 questions
{count} vote