Gallery › Security Center › Azure built-in policies
[Deprecated]: A security contact phone number should be provided for your subscription
Converted Policy AuditIfNotExists Disabled Mode All Version 1.0.0-deprecated Deprecated
Enter a phone number to receive notifications when Azure Security Center detects compromised resources - This policy is deprecated because phone numbers are no longer used in any scenario by Azure Security Center
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_Security_contact_phone_number.json · 49 lines
{
"properties": {
"displayName": "[Deprecated]: A security contact phone number should be provided for your subscription",
"policyType": "BuiltIn",
"mode": "All",
"description": "Enter a phone number to receive notifications when Azure Security Center detects compromised resources - This policy is deprecated because phone numbers are no longer used in any scenario by Azure Security Center",
"metadata": {
"version": "1.0.0-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "1.0.0",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "Disabled",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/securityContacts",
"existenceCondition": {
"field": "Microsoft.Security/securityContacts/phone",
"notEquals": ""
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/b4d66858-c922-44e3-9566-5cdb7a7be744",
"name": "b4d66858-c922-44e3-9566-5cdb7a7be744"
}Bylawb4d66858-c922-44e3-9566-5cdb7a7be744.bylaw.ps1 · 29 lines
# Converted from ASC_Security_contact_phone_number.json by ConvertTo-Bylaw.
Policy 'b4d66858-c922-44e3-9566-5cdb7a7be744' {
Properties @{
DisplayName = '[Deprecated]: A security contact phone number should be provided for your subscription'
Description = 'Enter a phone number to receive notifications when Azure Security Center detects compromised resources - This policy is deprecated because phone numbers are no longer used in any scenario by Azure Security Center'
Version = '1.0.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'Disabled'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Resources/subscriptions'
AuditIfNotExists 'Microsoft.Security/securityContacts' -Effect (Param Effect) {
Require 'phone is not' {
Field phone | Must -Not -Be '' -IfPresent
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_Security_contact_phone_number.json in Azure/azure-policy, under the MIT licence.
Bylaw