Description
For a Defender for Cloud security contact, alertNotifications controls new-alert email. notificationsByRole selects recipients by subscription role.
Potential impact
A severity threshold can exclude alerts that responders need. Role changes can also leave the wrong person receiving them.
Remediation
Set alertNotifications.state to On and choose minimalSeverity. For role-based delivery, enable notificationsByRole and select the roles. Confirm who holds those roles and verify receipt. If you use another alert channel, test it.
Examples
Use a template with targetScope = 'subscription' and supply real contact details. Both examples select the Owner role and the High threshold. The second switches new-alert email on.
Before
resource security_contact 'Microsoft.Security/securityContacts@2020-01-01-preview' = {
name: 'security contact'
properties: {
emails: 'sample@email.com'
phone: '9999999'
alertNotifications: {
state: 'Off'
minimalSeverity: 'High'
}
notificationsByRole: {
state: 'On'
roles: ['Owner']
}
}
}
After
resource security_contact 'Microsoft.Security/securityContacts@2020-01-01-preview' = {
name: 'security contact'
properties: {
emails: 'sample@email.com'
phone: '9999999'
alertNotifications: {
state: 'On'
minimalSeverity: 'High'
}
notificationsByRole: {
state: 'On'
roles: ['Owner']
}
}
}