Build Azure Security Visibility With Monitor, Log Analytics, and Sentinel

Design Azure security logging with activity logs, diagnostics, Log Analytics, Microsoft Sentinel, detections, automation, retention, and investigation evidence.

From telemetry to action

Collect the Azure signals that answer real investigation questions

Azure logging and Microsoft Sentinel are not complete when a diagnostic setting is enabled. The organization must know which events matter, whether the correct categories are collected, where data is routed, how long it is retained, who can access or delete it, what detections evaluate it, who owns the resulting incidents, and whether responders can contain the threat.

This guide covers Azure Activity Log, resource logs, platform metrics, Microsoft Entra activity logs, data collection rules, diagnostic settings, Log Analytics architecture, retention, data protection, Microsoft Sentinel data connectors, analytics, incidents, automation, hunting, cost control, and evidence.

Plan cost before broad ingestion. Log volume, workspace tier, Sentinel enablement, retention, archive, search, export, automation, and cross-region design can create charges. Estimate and monitor cost; do not enable paid capabilities or high-volume collection without the organization’s approved budget and change process.

Security visibility pipeline

Preserve context from source event to response outcome

SourcesEntra · Activity Log · resources · workloads · networks · Defender · SaaS
CollectionDiagnostic settings · data connectors · agents · data collection rules · APIs
StorageLog Analytics · archive · storage · event hub · protected export
AnalyticsRules · UEBA · watchlists · threat intelligence · hunting · workbooks
ResponseIncident · owner · investigation · automation · containment · evidence

Source inventory

Know what Azure records automatically and what must be configured

SourceSecurity valueCollection decisionValidation
Azure Activity LogSubscription control-plane create, update, delete, action, policy, security, and service-health eventsAzure retains the log for a default period; export with diagnostic settings for longer retention and analyticsMake a benign resource change and query the actor, operation, scope, status, time, and correlation ID
Microsoft Entra sign-insInteractive, non-interactive, service-principal, managed-identity, risk, device, authentication, and Conditional Access contextRoute required categories through Entra diagnostic settings; account for licensing and retentionPerform representative sign-ins and verify applied policy and authentication details
Microsoft Entra auditUser, group, application, role, authentication-method, policy, consent, and directory changesCollect the categories required for investigation and protected audit historyCreate a controlled directory change and correlate actor, target, and result
Resource logsService-specific data-plane, administrative, request, firewall, audit, and security eventsEnable per resource or at scale with supported policy or data collection featuresGenerate a service event and confirm the correct resource-specific table or destination
Platform metricsPerformance, capacity, availability, errors, throttling, and service behaviorSelect metrics that support security and operational use cases; configure alertsTest threshold or dynamic alert routing
Defender for CloudRecommendations, attack paths, alerts, workload signals, vulnerability findingsConfirm plan coverage, connector, integration, notification, and export behaviorTrace a test or historical alert into the incident workflow
Network telemetryFirewall, WAF, gateway, Front Door, Application Gateway, DNS, flow, and connection eventsChoose supported current sources and retention; monitor product transitionsPerform an allowed and denied connection and locate both records
Guest operating systemsSecurity events, processes, authentication, EDR, syslog, application logsUse Azure Monitor Agent and data collection rules or approved endpoint toolingConfirm agent health, source computer, event time, and required fields
Applications and APIsUser activity, authorization, transactions, errors, fraud, sensitive actions, trace contextInstrument securely; avoid secrets and unnecessary personal dataRun a known transaction and correlate application, identity, and Azure events
Backup and recoveryPolicy changes, protection stop, deletion, restore, vault security, jobs, alertsRoute critical changes and job status to accountable owners and security monitoringPerform a controlled test or review a restore record end to end

Diagnostic settings

Route the right categories to the right destination

Azure Monitor diagnostic settings can send resource logs, metrics, and Activity Log categories to Log Analytics, a storage account, or an event hub. A separate setting is traditionally created for each resource; newer platform-log data collection rule capabilities may support selected resource types and should be evaluated against current Microsoft guidance.

Use resource-specific tables where supported and appropriate because they often provide clearer schemas than the legacy AzureDiagnostics table. Record the selected categories, destination resource ID, table mode, retention, owner, deployment method, and reason. Monitor deletion or modification of diagnostic settings.

At scale, use Azure Policy with deployIfNotExists or another governed deployment method to standardize collection. Test the managed identity, permissions, remediation tasks, existing-resource behavior, regional requirements, and cost. A policy marked compliant does not prove events are arriving; query a sample from every critical service family.

Diagnostic validation

  • Correct tenant, subscription, resource, and region
  • All required log categories selected
  • Destination exists and is protected
  • Resource-specific table mode chosen intentionally
  • Events arrive with expected fields and time
  • Retention meets investigation and compliance need
  • Health and ingestion gaps are monitored
  • Changes to settings create an alert
  • Policy remediation covers existing and new resources
  • Cost and volume are reviewed

Workspace architecture

Balance ownership, region, access, retention, and Microsoft Sentinel cost

Single or multiple workspaces

A centralized workspace can simplify cross-resource analytics and SOC operations. Multiple workspaces may be justified by tenant, region, data residency, access isolation, business ownership, retention, billing, or operational boundaries. Sentinel-enabled data has pricing implications, so do not combine security and high-volume operational data without analysis.

Access and separation

Use Azure RBAC and table or resource-context access where appropriate. Limit who can query sensitive identity, application, and security logs; who can change retention; who can purge data; and who can manage Sentinel rules and automation. Separate content authors, responders, platform administrators, and evidence custodians when risk justifies it.

Retention and archive

Choose interactive retention according to investigation needs and table value. Use long-term retention, archive, search jobs, restoration, storage export, or event hub integration where justified. Azure Activity Log has a default retention period; export if longer history is required.

Evidence resilience

Use resource locks to reduce accidental workspace deletion or retention change, while recognizing that authorized administrators can remove a lock. For stronger tamper resistance, export selected audit data to immutable storage with separately governed access and retention.

Microsoft Sentinel operating loop

Turn detections into owned, repeatable response

ConnectRequired data sources and connector health
DetectScheduled · near-real-time · anomaly · fusion · threat intelligence
TriageSeverity · entity · asset criticality · evidence · owner
InvestigateTimeline · graph · queries · enrichment · scope
RespondContain · revoke · isolate · block · preserve · communicate
ImproveRoot cause · tuning · lessons · control change · retest

Data connectors and content

Enable only what the team can validate, monitor, and operate

Inventory each connector, solution, content hub package, permission, prerequisite, data table, expected volume, health signal, owner, and update process. Confirm connectors for Microsoft Entra, Azure Activity, Defender products, Microsoft 365, network controls, endpoints, servers, and third-party systems according to the incident use cases. A connector can appear configured while permissions, licensing, agent health, API limits, or filters prevent useful data.

Review solution updates and content dependencies. Built-in analytics templates are starting points; enable them only after understanding data requirements, query logic, entity mapping, scheduling, thresholds, suppression, incident grouping, automation, and expected false positives. Preserve local changes and version custom rules.

Do not measure success by rule count. A small set of tested detections with clear ownership can be more useful than hundreds of noisy alerts that analysts ignore.

Detection use cases

Start with high-impact Azure changes and credible attack paths

Identity

Privileged sign-in and policy abuse

Detect unusual administrator sign-in, risky authentication, new credential or method, emergency-account use, Conditional Access change, named-location change, application consent, and security-setting modification.

Privilege

Role grants and PIM anomalies

Detect Owner, User Access Administrator, Global Administrator, or custom high-impact assignment; permanent role creation; unusual activation; approver change; and role-setting modification.

Network

New exposure and control bypass

Detect public IP creation, broad NSG rule, management-port exposure, route change, firewall or WAF disablement, new peering, private endpoint change, DNS modification, and denied traffic spikes.

Data

Credential and data access anomalies

Detect Shared Key re-enable, unusual SAS or data access, Key Vault secret or key deletion, purge attempt, permission change, mass download, database anomaly, and diagnostic-setting removal.

Workload

Execution and persistence

Detect suspicious VM extension, run command, new automation credential, container deployment from an unknown registry, privileged pod, Defender alert, endpoint tampering, and vulnerable exposed asset.

Recovery

Backup sabotage

Detect protection stop, backup deletion, immutability or soft-delete change, Resource Guard modification, vault role assignment, policy reduction, failed jobs, and unusual restore activity.

Analytics-rule engineering

Document the signal, logic, expected response, and test

FieldRequired decisionQuality checkEvidence
Threat scenarioDescribe the attacker action, affected control, and business consequenceRule is tied to a real response decisionUse-case document and control map
Data dependencyTables, fields, connectors, permissions, latency, retentionSource health is monitored and fields are populatedSample query and connector health
Query logicTime window, joins, thresholds, allowlists, entity mapping, exclusionsLogic is readable, versioned, and peer reviewedRule export, repository, test cases
Incident behaviorSeverity, grouping, suppression, alert details, tactics, techniquesOne event does not create uncontrolled duplicate incidentsTest incident and tuning record
ResponseOwner, SLA, triage questions, containment authority, escalationAnalyst can act without guessingRunbook, assignment, case record
AutomationEnrichment, notification, ticketing, disablement, isolation, blockingPermissions are least privilege and destructive action requires suitable approvalPlaybook identity, role, run history, failure alert
Test and maintenanceBenign test, expected result, review date, owner, dependency changeRule fires, creates the right incident, and receives responseTest record, screenshots without secrets, query result, ticket

Automation

Use playbooks to accelerate response without creating another privileged path

Automation rules can assign incidents, change status, add tags, and run playbooks. Logic Apps and other playbooks can enrich entities, notify teams, create tickets, revoke sessions, disable accounts, isolate devices, block indicators, or change cloud controls. Review the managed identity, connectors, API permissions, Azure RBAC, secret storage, network access, error handling, concurrency, retry behavior, data exposure, and change ownership.

Separate enrichment from destructive containment. Automated user disablement, network blocking, VM isolation, or key rotation can disrupt the business if the signal is wrong. Use approval, high-confidence conditions, limited scope, simulation, and rollback according to risk. Monitor playbook failures and expired connections.

Retain the incident timeline, rule version, playbook run, actor, decision, evidence, containment result, recovery action, and lessons learned. Do not put sensitive client data or secrets into notifications that leave the controlled environment.

Before automatic containment

  • Is the detection high confidence and tested?
  • Is the affected entity mapped correctly?
  • Could the action interrupt patient care, revenue, safety, or recovery?
  • Does the automation identity have narrow permission?
  • Is approval required for destructive action?
  • Can the action be reversed quickly?
  • Are failures and partial completion alerted?
  • Is the complete action recorded?

Cost and signal quality

Control volume without discarding the evidence the investigation needs

Measure daily ingestion by workspace, table, source, resource, and solution. Identify sudden changes, duplicate collection, verbose application logs, high-cardinality fields, low-value debug data, and tables with retention longer than their value. Use table plans, transformations, filtering at the source, data collection rules, commitment tiers, archive, and export only after understanding the security impact and current Microsoft pricing.

Do not use a daily cap as the primary security cost control; it can stop collection during an incident, exactly when volume rises. If a cap is used as an emergency guardrail, alert well before the threshold and document the risk. Preserve critical identity, Activity Log, security, firewall, Key Vault, and backup signals even when optimizing less valuable telemetry.

Metrics should include source coverage, connector health, ingestion delay, detection test success, mean time to acknowledge, mean time to contain, incident aging, false-positive rate, unassigned incidents, playbook failure, required-source gaps, retention compliance, and cost by use case.

Assessment and operations

Connect security visibility to the people who can act

OC Security Audit can assess log coverage, evidence quality, detection logic, response ownership, and risk. When findings require Azure monitoring and Log Analytics implementation, the IT Perfection Azure Monitor and Log Analytics guide can support the operational plan.

Closure test

Generate a controlled source event, confirm ingestion, run the analytics logic, inspect the incident, assign it, execute the approved response path, verify the outcome, and retain the complete timeline.

Practical questions

Frequently asked questions

Does Azure collect all security logs automatically?

No. Activity Log is collected by the platform, but resource logs and many identity or workload sources require diagnostic settings, connectors, agents, data collection rules, or application instrumentation.

How long does Azure retain Activity Log?

Microsoft currently documents a default retention period for Activity Log and recommends exporting it when longer retention or additional analysis is needed. Verify current documentation for exact behavior.

Does Microsoft Sentinel replace a SOC process?

No. Sentinel provides SIEM and security operations capabilities, but the organization still needs use cases, data ownership, analysts, triage, authority, escalation, containment, evidence, and improvement.

How many Sentinel analytics rules should be enabled?

Enable the rules that support defined, testable response use cases and available data. Rule count is less important than source health, signal quality, ownership, tuning, and response effectiveness.

How can Azure logging cost be controlled?

Measure ingestion by source and table, remove duplicate or low-value data, filter carefully, choose suitable table plans and retention, archive selectively, monitor budget, and preserve critical security evidence.

About the author

Azure security guidance by Ali Hassani, CISO

Reviewed for practical Azure security, evidence, and remediation guidance by Ali Hassani, CISO, with 25+ years of IT and cybersecurity experience.

Meet Ali Hassani

This material is for initial guidance only and does not replace a professional cybersecurity audit, compliance assessment, penetration test, or legal/compliance review. Validate configuration, licensing, service availability, architecture, and business impact before production changes.