CIS Microsoft Azure Foundations Benchmark v1.4.0/Logging and Monitoring/84 of 115
5.3Ensure that Diagnostic Logs Are Enabled for All Services that Support it.
Control family: Logging and Monitoring
Control description
Diagnostic Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself, for example, getting a secret from a Key Vault. Currently, 32 Azure resources support Diagnostic Logging (See the references section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps and CosmosDB. The content of these logs varies by resource type. For example, Windows event system logs are a category of diagnostics logs for VMs, and blob, table, and queue logs are categories of diagnostics logs for storage accounts.
A number of back-end services were not configured to log and store Diagnostic Logs for certain activities or for a sufficient length. It is crucial that logging systems are correctly configured to log all relevant activities and retain those logs for a sufficient length of time. By default, Diagnostic Logs are not enabled. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended.
Note: The CIS Benchmark covers some specific Diagnostic Logs separately.
'''
3.3 - Ensure Storage logging is enabled for Queue service for read, write, and delete requests
6.4 Ensure that Network Security Group Flow Log retention period is 'greater than 90 days'
'''
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
The activity log shows changes to resources; resource logs show what happens inside them, such as secrets read from a key vault, requests to an app or traffic through a load balancer. Every resource that offers resource logs sends them to a central workspace, so investigations aren't missing the inside view.
Before you start
The same on every cloud, before the steps in the tabs.
- Decide which resource types send resource logs to the central workspace (all that support them, unless cost rules some out) and how long they are kept.
- Record any resource type left out, with the reason.
Evidence
- The resource logging standard and its exceptions
On Azure the tasks add diagnostic settings to individual resources, apply them at scale with a built-in Azure Policy initiative, and keep it checked with the CIS standard.
Task 1Add a diagnostic setting to a resource
- Sign in to the Azure portal at portal.azure.com and open the resource, such as a key vault, app, or network security group.
- Select Diagnostic settings (under Monitoring), then Add diagnostic setting.
- Under Category groups, select allLogs (or audit where cost matters).
- Select Send to Log Analytics workspace and the security workspace, then Save.
- Check it: entries from the resource appear in the workspace.
Task 2Apply resource logging at scale with Azure Policy
- Open Policy > Definitions and search for the built-in initiative that enables the allLogs category group for supported resources to Log Analytics.
- Select it, then Assign, and set Scope to the management group or subscription.
- On Parameters, choose the security workspace; on Remediation, select Create a remediation task and a managed identity.
- Select Review + create, then Create.
- Check it: Policy > Compliance shows resources becoming compliant as the remediation runs.
Task 3Keep it checked with the CIS v1.4.0 standard in Defender for Cloud
- Open Microsoft Defender for Cloud > Regulatory compliance and select Manage compliance policies.
- Select the subscription, select Security policies, find CIS Microsoft Azure Foundations Benchmark v1.4.0 and toggle its status to On (once per subscription).
- Back on Regulatory compliance, open the CIS Microsoft Azure Foundations Benchmark v1.4.0 standard and expand recommendation 5.3.
- Open the assessment for Resource logs in Key Vault should be enabled and App Service apps should have resource logs enabled and turn on logging for each resource type it lists.
- Check it: every resource under recommendation 5.3 shows as passing after the next evaluation.
Evidence
- The diagnostic settings of a sample of resources
- The resource logging initiative assignment and its compliance
- The CIS v1.4.0 standard, with recommendation 5.3 passing
Not applicable. This benchmark covers Azure only.
Not applicable. This benchmark covers Azure only.
Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.