Share via

problem with IOTHUB creating

Abdeslem Bouchabane 0 Reputation points
2026-03-11T08:02:18.96+00:00

Bonjour,

Not possible to create an IOTHUB under free student account. There is enough credit. Below the error.

thanks for your help

{

"code": "InvalidTemplateDeployment",

"message": "The template deployment failed because of policy violation. Please see details for more information.",

"details": [

{

  "code": "RequestDisallowedByAzure",

  "target": "IOTHUBADEM",

  "message": "Resource 'IOTHUBADEM' was disallowed by Azure: This policy maintains a set of best available regions where your subscription can deploy resources. The objective of this policy is to ensure that your subscription has full access to Azure services with optimal performance. Should you need additional or different regions, contact support.."

}

]

}

Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.

0 comments No comments

2 answers

Sort by: Most helpful
  1. SRILAKSHMI C 17,130 Reputation points Microsoft External Staff Moderator
    2026-03-17T03:22:50.7066667+00:00

    Hello Abdeslem Bouchabane,

    Welcome to Microsoft Q&A and Thank you for sharing the error details.

    I understand that your student subscription has an Azure Policy in place that restricts which regions you can deploy resources into. The error

    What the error means

    RequestDisallowedByAzure
    

    indicates that your subscription (likely an Azure free student account) is restricted by an Azure Policy that limits which regions you can deploy resources into.

    This is not a credit issue, but a region restriction applied to your subscription.

    When you try to create an Azure IoT Hub in a region that is not part of the “Allowed Locations” list, Azure blocks the deployment with this error.

    Why this happens

    With certain subscription types (such as student/free accounts), Azure enforces policies to:

    Allow deployments only in specific approved regions

    Ensure service availability and optimal performance

    Control usage and costs

    Here are the few troubleshooting steps to fix the issue,

    1. Verify allowed regions in your subscription

    In the Azure Portal:

    1. Go to Policy
    2. Select Assignments
    3. Look for a policy like “Allowed Locations”
    4. Review the list of permitted regions
    5. Choose a supported region for your IoT Hub

    When creating your IoT Hub, select a region from the allowed list, for example:

    East US

    East US 2

    West Europe

    North Europe

    Southeast Asia

    Avoid Regions not included in your policy, Regions not supported by IoT Hub.

    1. Redeploy the IoT Hub in an allowed region

    Azure Portal

    when creating the IoT Hub, pick an allowed region in the Region dropdown

    Azure CLI example

    az iot hub create \
    

    ARM Template

    Update the "location" property to one of your allowed regions

    The deployment failed due to an Azure Policy restricting regions, not lack of credits

    The Azure IoT Hub must be created in an allowed region

    Switching to a permitted region should resolve the issue immediately.

    Please refer this

    iothub-westus3-disabled • ARM template / CLI / SDK IoT Hub reference: https://docs.microsoft.com/azure/templates/microsoft.devices/iothubs?tabs=json

    • az iot hub create CLI docs: https://docs.microsoft.com/cli/azure/iot/hub#az-iot-hub-create

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


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!


  2. Q&A Assist
    2026-03-11T08:02:40.77+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error indicates that the deployment is blocked by an Azure policy on the subscription, not by lack of credit or a problem with the IoT Hub template itself.

    Key points from the error:

    • InvalidTemplateDeployment with inner code RequestDisallowedByAzure.
    • Message: “This policy maintains a set of best available regions where your subscription can deploy resources… Should you need additional or different regions, contact support.”

    This means:

    • The student subscription has a policy that restricts which Azure regions can be used.
    • The region selected for the IoT Hub is not in the allowed list for that subscription.

    To proceed:

    1. Create the IoT Hub in a different region that is allowed by the subscription policy (for example, try common regions like West Europe, East US, etc., depending on what is available in the portal for that subscription).
    2. If no suitable region is available for IoT Hub in the subscription, contact Azure support as the error message suggests and request that the policy be adjusted or that additional regions be enabled for the student subscription.

    The deployment template itself is not the issue; the subscription-level policy is.


    References:

Your answer

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