Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Hii @QR,
You are seeing the error “RequestDisallowedByAzure” because your subscription has Azure Policies that restrict which regions you are allowed to deploy resources into. This behavior is expected, especially for Azure for Students subscriptions.Azure for Students subscriptions only allow deployments in a small, predefined list of regions, and these allowed regions can vary from one student account to another. If the Azure CLI selects a region that is not permitted, any App Service, Static Web App, VM, or other resource creation will fail with this error.
This Happens because:
- Azure automatically enforces policies such as “Allowed resource deployment regions.”
- Azure for Students has limited regional availability, so even globally available services may not be allowed for your specific subscription.
- When you run
az webapp upwithout specifying a region, Azure chooses a default region which may not be allowed for your subscription.
Please follow below recommended steps to resolve the issue:
1.You can check the Allowed locations by following below step:
- Go to Azure Portal > Policy > Assignments > search for Allowed resource deployment regions / Allowed locations > View the list of regions permitted for your subscription.2.
2.Deploy using an allowed region:
Run the command below, replacing values with your app name, resource group, and an allowed region from your policy list:
az webapp up --name YourAppName --resource-group YourResourceGroupName --location YourPreferredLocation
Some student subscriptions have restrictions where certain services (like App Service or Static Web Apps) are not available in any allowed region. In this case, you may need to open an Azure Support request to clarify or request additional region access.
Reference:
https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest#az-webapp-up
https://learn.microsoft.com/en-us/microsoft-365/services/error-request-disallowed-by-policy?view=o365-worldwide
Kindly let us know if the above comment helps or you need further assistance on this issue.
Please "accept" if the information helped you. This will help us and others in the community as well.