azure student subscription region error

Mohammed Kaif 30 Reputation points

{"code":"InvalidTemplateDeployment","details":[{"code":"RequestDisallowedByAzure","target":"demostores","message":"Resource 'demostores' 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.."}],"message":"The template deployment failed because of policy violation. Please see details for more information."}

i have used all the regions east us, west us, south central us and west europe and also of india but the same problem

  1. TH 0 Reputation points

    I got the same error "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" when trying to create Static Web App. It only allows to use regions "West US 2", "Central US", East US 2", "West Europe", East Asia".

    None of these region are permitted in Azure for Students. How do I create a Static Web App?

  2. xslar 0 Reputation points

    I have same problem, did you find out how to solve this problem?


Sign in to comment

Answer accepted by question author

TP 157.5K Reputation points Volunteer Moderator

Hi,

Azure for Students restricts which regions you can deploy resources to. Typically you are restricted to five different regions, and these vary for each person.

Please navigate to Azure Policy -- Authoring -- Assignments using link below:

https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Assignments

Click on assignment named Allowed resource deployment regions

👁 User's image

Examine Allowed locations Parameter value for list of regions, similar to below (regions in screenshot are different than yours):

👁 User's image

The regions shown in your Parameter value are the ones you are allowed to deploy resources to. Please try to create resources in one of these regions and let me know the results.

Please click Accept Answer and upvote if the above was helpful.

Thanks.

-TP

  1. Mohammed Kaif 30 Reputation points

    no location details

  2. Mohammed Kaif 30 Reputation points

    no location details

  3. TP 157.5K Reputation points Volunteer Moderator

    What do you see when you go to Policy -- Authoring -- Assignments using the link I posted above? Can you post screenshot?

  4. Mohammed Kaif 30 Reputation points

    h👁 123

    ere its is

  5. TP 157.5K Reputation points Volunteer Moderator

    Thanks for the screenshot. When you get the error, if you click on the details and the Raw error tab, does the JSON error contain list of allowed regions?

    If needed I was thinking we could write script that would loop through all the regions and try to create storage account in each. The regions where it succeeds would be your list of allowed regions.

    Other people that got same error as you had list of allowed regions in their policy assignments. Unsure why it isn't showing for you, but will get it figured out.


Sign in to comment

1 additional answer

  1. Tayyab Tahir 25 Reputation points

    For student subscription list of Allowed Locations":
    norwayeast", "polandcentral", "spaincentral", "switzerlandnorth"

    1. Tayyab Tahir 25 Reputation points

      For student subscription list of Allowed Locations": norwayeast", "polandcentral", "spaincentral", "switzerlandnorth"

    2. Tayyab Tahir 25 Reputation points

      Query to get allowed locations: az policy assignment list \

      --subscription YourSubscriptionId \

      --query "[?parameters.listOfAllowedLocations.value!=null].parameters.listOfAllowedLocations.value[]" \

      -o tsv

    3. Tayyab Tahir 25 Reputation points

      Query to get allowed locations: az policy assignment list \

      --subscription YourSubscriptionId \

      --query "[?parameters.listOfAllowedLocations.value!=null].parameters.listOfAllowedLocations.value[]" \

      -o tsv


    Sign in to comment
Sign in to answer

Your answer