Unable to Create Device in IoT Hub

Taz Walker 31 Reputation points
2022-10-10T05:31:00.09+00:00

I have created a new IoT Hub and the options to add a device are greyed out.

The following error is displayed when going to the device tab:
"Unable to retrieve devices. The request failed with the following information: NetworkError when attempting to fetch resource."

Using the Azure IoT Explorer to create a device comes up with the following error:
"Failed to add device device-01: Error: {"errorCode":401002,"trackingId":"753dae78f1624fdabe49099734ffa847-G:0-TimeStamp:10/10/2022 05:27:26","message":"Unauthorized","timestampUtc":"2022-10-10T05:27:26.6829652Z"}"

  • Access role for resource and hub is owner
  • Logged in and out of portal many times
  • Used different browsers, computers, and networks
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,271 questions
{count} vote

Accepted answer
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2022-10-11T05:36:22.033+00:00

    @Taz Walker Welcome to Microsoft Q&A forum!

    I understand that you have the required permissions to create an Azure IoT Hub. Were you able to add devices to the existing IoT Hub earlier or seeing this issue only with newly created IoT Hubs?

    As per error message, you have trouble accessing your IoT hub device page and the possible reason could be your network configuration. You might have disabled the access to the IoT Hub while creating by choosing private access. See below screenshot for reference.

    249186-image.png

    If you have selected the disabled public network access option then you will see this type of errors.

    I modified the access and seeing the same error.

    249232-image.png

    I just tried creating Azure IoT Hub free tier in Australia Southeat region and able to add devices without any issue.

    I suggest you first check the Networking page to see if public network access is disabled or restricted to selected IP ranges.

    Goto your IoT Hub --> Networking

    249203-image.png

    If you are unable to change or modify the network settings, request permission from your IT administrator to add your IP address in the IP address range or to enable public network access to all networks. If that fails to resolve the issue, check your local network settings or contact your local network administrator to fix connectivity to the IoT Hub. For example, sometimes a proxy in the local network can interfere with access to IoT Hub.

    For more details, see Managing public network access for your IoT hub

    How do I find the SKU?

    You can find the SKU under Pricing and Scale tab in your IoT Hub.

    249125-image.png

    Note that, You cannot upgrade from the free tier to either basic or standard. See How to upgrade your IoT hub

    Hope this helps. Do let us know if you have any further queries.

    If the response is helpful, please click "Accept Answer" and upvote it.

    3 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Matthijs van der Veer 4,376 Reputation points MVP Volunteer Moderator
    2022-10-13T07:58:56.903+00:00

    When you are an "Owner" of an IoT Hub, you can control the resource. However, that does not give you access to the data plane of the IoT Hub. Try giving yourself the "IoT Hub Data Contributor" role.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.