AZ-900 Microsoft Azure Fundamentals 2020

Sign Up Free or Log In to participate!

********Unable to create VNET on Azure – Fails with validation error*****Serious concern

Hi Support team,

Am unable to create a VNET on Azure while using the lab which prevents me from further hands on practice. Changed browsers but the issue remains the same. The error code is as follows shown partially. The first line indicates a policy violation and not sure why it were given to be used for the hands on lab prior to testing. No point in having these credentials when the job is not getting done

{"code":"InvalidTemplateDeployment","message":"The template deployment failed because of policy violation. Please see details for more information.","details":[{"code":"RequestDisallowedByPolicy","target":"VNet11","message":"Resource ‘VNet11’ was disallowed by policy. (Code: RequestDisallowedByPolicy)","additionalInfo":[{"type":"PolicyViolation","info":{"policyDefinitionDisplayName":"Allowed locations","evaluationDetails":{"evaluatedExpressions":[{"result":"True","expressionKind":"Field","expression":"location","path":"location","expressionValue":"uksouth","targetValue":["canadaeast","centralindia","centralus","eastasia","eastus","eastus2","germanynorth","germanywestcentral","global","japanwest","koreacentral","koreasouth","northcentralus","southcentralus","southindia","westcentralus","westindia","westus","westus2"],"operator":"NotIn"},{"result":"True","expressionKind":"Field","expression":"location","path":"location","expressionValue":"uksouth","targetValue":"global","operator":"NotEquals"},{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Network/VirtualNetworks","targetValue":"Microsoft.AzureActiveDirectory/b2cDirectories","operator":"NotEquals"}]},"policyDefinitionId":"/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c","policyDefinitionName":"e56962a6-4747-49cd-b67b-bf8b01975c4c","policyDefinitionEffect":"deny","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/Vader-Gen2-Labs/providers/Microsoft.Authorization/policyAssignments

2 Answers

Hi there,

When you are configuring the cloud shell, are you providing a unique name for the Storage account and file share? I was getting this same error and it was due to this.


Hi Gwyneth,

Hi Gwyneth,

Thanks for your reply.

No, I used to leave both the fields blank when I got this error. After doing a bot of search on the MS documents, I found out that when I clicked on Advanced Settings while configuring Power shell, it was automatically defaulting to a different location(West Europe), whereas the Resource group was created on East US.

What is required to resolve this issue is to simply change the default location which can be found right above the Storage Account and File share fields to match your Resource Group location and it works seamless. You can still leave the Storage Account and File share fields as blanks.

Not sure why Azure would do this mess of choosing a different default location


relevant docs can be found in the link –

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?