Tuesday, 7 September 2021

Microsoft Azure PowerShell Storage Creation Error - 403

I was recently completing a Microsoft Azure lab and was starting a new PowerShell window. Within the PowerShell setup page you need to set a storage account and file share in order to use the PowerShell. The specific (advanced) settings you need to select are:

  • Subscription
  • Cloud Shell Region
  • Resource Group
  • Storage Account
  • File Share
I already had a pre-defined subscription and resource group and the region appeared to be pre-selected based on my location (Europe). The next step is to create a new storage account and file share but pressing 'Create' gave a 403 error and the below error message.

{"error":{"code":"RequestDisallowedByPolicy","target":"the123cloud","message":"Resource 'the123cloud' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"Allowed locations\",\"id\":\"/providers/Microsoft.Management/managementGroups/temp/providers/Microsoft.Authorization/policyAssignments/1111111111111\"},\"policyDefinition\":{\"name\":\"Allowed locations\",\"id\":\"/providers/Microsoft.Authorization/policyDefinitions/22222222222222\"}},{\"policyAssignment\":{\"name\":\"Allowed locations - Exclude IoTCentral\...


The keywords in the error were "RequestDisallowedByPolicy" and "Allowed locations" which essentially means the Cloud Shell Region selected was disallowed either because it wasn't selected within the subscription policy OR was intentionally excluded.

  1. Select a valid region in the 'Cloud Shell Region' which is allowed
  2. Ask the administrator to allow the location in the subscriptions policies

No comments:

Post a Comment