skip to Main Content

I just created an IoTHub with a Device Provisioning Service and I get an error when I try to link the two together.
The Azure portal sends me back

There was a problem updating your Device Provisioning Service to link to IoT hub. An unexpected error occurred while updating your Device Provisioning Service. Error message: Unable to find the IoThub <my iothub>.azure-devices.net. Check if the hub exists and the connection information is correct.

Is it an Azure problem or a configuration problem on my side?
Thank for your help

I try to link manually from the portal my DPS and my IoT Hub but it doesn’t work. I follow the documentation about shared access policy configuration but mine is on "Allow"

2

Answers


  1. Chosen as BEST ANSWER

    I found where are located the issue. It's because my iothub was not accessible via public network. I just change Terraform related setting and it was done.


  2. I created IOT device using microsoft and connected Azure IoT Hub Device Provisioning Service (DPS). I got the same error and resolved it.
    Thanks to Victoria Litvinova for Reference

    – In bash

    enter image description here

    • To check if the list of IOT Hub connected to DPS bash.
    az iot dps linked-hub list --dps-name dpsname --resource-group resourcegroupname
    
    

    enter image description here

    • For linking dps existing with Iot hub in Bash
     az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=user123" --location westus
    

    enter image description here

    enter image description here

    For updating Dps existing with IoT hub in Bash

    
    az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
    

    enter image description here

    – In Powershell

    enter image description here

    • ***To check if the list of IOT Hub connected to DPS ***

    • Poweshell

    az iot dps linked-hub list --dps-name $dpsName --resource-group $resourceGroupName
    

    For linking dps with Iot hub

    • Poweshell
    az iot dps linked-hub create --dps-name MyExampleDps --resource-group MyResourceGroup --connection-string "HostName=MyExampleHub.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0=" --location westus
    

    enter image description here

    For updating Dps with IoT hub

    • using PowerShell update the DPS
    
    az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net --allocation-weight 10 --apply-allocation-policy True
    Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub Device Provisioning Service
    

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search