Skip to content

Instantly share code, notes, and snippets.

@michimau
Created April 6, 2021 12:10
Show Gist options
  • Save michimau/cd1155eb09bde1fd900815b770d19ebe to your computer and use it in GitHub Desktop.
Save michimau/cd1155eb09bde1fd900815b770d19ebe to your computer and use it in GitHub Desktop.
4Joost
{
"error": {
"code": "RequestDisallowedByPolicy",
"target": "csb100320012be01301",
"message": "Resource 'csb100320012be01301' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"Allowed locations only Europe\",\"id\":\"/subscriptions/8843be4d-dffd-4152-97a5-08024d314435/providers/Microsoft.Authorization/policyAssignments/e7fc90b6c93b41d5abb7689b\"},\"policyDefinition\":{\"name\":\"Allowed locations\",\"id\":\"/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c\"}}]'.",
"additionalInfo": [
{
"type": "PolicyViolation",
"info": {
"policyDefinitionDisplayName": "Allowed locations",
"evaluationDetails": {
"evaluatedExpressions": [
{
"result": "True",
"expressionKind": "Field",
"expression": "location",
"path": "location",
"expressionValue": "westeurope",
"targetValue": [
"europe"
],
"operator": "NotIn"
},
{
"result": "True",
"expressionKind": "Field",
"expression": "location",
"path": "location",
"expressionValue": "westeurope",
"targetValue": "global",
"operator": "NotEquals"
},
{
"result": "True",
"expressionKind": "Field",
"expression": "type",
"path": "type",
"expressionValue": "Microsoft.Storage/storageAccounts",
"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": "/subscriptions/8843be4d-dffd-4152-97a5-08024d314435/providers/Microsoft.Authorization/policyAssignments/e7fc90b6c93b41d5abb7689b",
"policyAssignmentName": "e7fc90b6c93b41d5abb7689b",
"policyAssignmentDisplayName": "Allowed locations only Europe",
"policyAssignmentScope": "/subscriptions/8843be4d-dffd-4152-97a5-08024d314435",
"policyAssignmentParameters": {
"listOfAllowedLocations": {
"value": [
"europe"
]
}
}
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment