Forum Discussion

sivaram1325's avatar
sivaram1325
Copper Contributor
Jul 16, 2019

Azure custom policy is not working. Need help!!!!

Hi,

 

Trying to check whether SecurityContacts/email presents with this policy. It is not showing. Also the policy execution interval is intermittent. 

 

"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Security/securityContacts"
},
"then": {
"effect": "AuditIfNotExists",
"details": {
"type": "Microsoft.Security/securityContacts",
"existenceCondition": {
"field": "Microsoft.Security/securityContacts/email",
"exists": "true"
}
}
}
}
  • sivaram1325's avatar
    sivaram1325
    Copper Contributor

    Fixed the issue. The issue is that email attribute is null though the SecurityContacts settings is not enabled. So need to check for null values which made the policy to trigger vilations..

     

    This issue can be closed..

Resources