Microsoft Defender for Cloud: Complete Setup Guide 2026

·

Microsoft Defender for Cloud (MDC) is Azure's cloud-native application protection platform — a CNAPP that fuses Cloud Security Posture Management (CSPM) with Cloud Workload Protection (CWPP). In plain terms: it continuously grades your configuration against a security benchmark, produces a running Secure Score, and layers threat detection on top of your VMs, containers, databases, storage and identities — across Azure, AWS, GCP and on-prem.

This guide walks the whole rollout three ways. You will enable Defender plans in the portal for a quick start, reproduce it with the Azure CLI for repeatability, then codify it in Bicep and Terraform so a hundred subscriptions look identical. After that we onboard AWS, GCP and physical servers via Azure Arc, tune the plans that matter, and export everything into Microsoft Sentinel.

It is written for the 2026 platform: foundational CSPM moving to an opt-in model for new subscriptions from 27 October 2026, multicloud connectors that now use short-lived federated credentials, and the deprecated pricing-plan API changes from mid-2026. Every command is copy-pasteable — swap in your own IDs and go.

◈ Table of Contents

01 What It Is & Why It Matters 02 Prerequisites & Requirements 03 Method 1 — Azure Portal 04 Method 2 — Azure CLI 05 Method 3 — Bicep & Terraform 06 Initial Configuration 07 Defender Plans Deep Dive 08 Multicloud & Integration 09 Advanced Configuration 10 Monitoring & Troubleshooting 11 Sources & References
🛡️

01 — What It Is & Why It Matters

OVERVIEW

Defender for Cloud has two engines working in tandem. CSPM is the posture side — it reads the control-plane configuration of every resource, compares it to the Microsoft Cloud Security Benchmark (MCSB), and surfaces recommendations such as "Storage account allows public blob access" or "SQL server has no auditing." Those recommendations roll up into a single Secure Score percentage that executives and engineers alike can track. CWPP is the workload side — the paid Defender plans that add runtime threat detection, agentless malware scanning, vulnerability assessment and behavioural alerts to servers, containers, databases and more.

Foundational (free) CSPM is available to every Azure subscription and gives you the Secure Score, asset inventory and MCSB assessment at no cost. The paid Defender CSPM plan unlocks the features defenders actually pivot on: agentless vulnerability and secret scanning, attack path analysis, and the Cloud Security Explorer graph. A blue team should think of the free tier as visibility and the paid tiers as detection and response.

📊

Continuous Posture Grading

Every misconfiguration across Azure, AWS and GCP is scored against the MCSB and industry standards (CIS, NIST, PCI-DSS), giving you one Secure Score to drive remediation sprints.

🔬

Agentless Workload Scanning

Defender CSPM snapshots disks and scans them out-of-band for vulnerabilities, malware and plaintext secrets — no agent to deploy, no runtime performance hit.

🧭

Attack Path Analysis

The graph engine chains findings — internet-exposed VM → high-severity CVE → over-privileged managed identity → sensitive storage — so you fix the one node that breaks the chain.

🚨

Workload Threat Detection

Defender plans raise behavioural alerts — crypto-mining on a VM, anonymous access to a Key Vault, a malicious SQL injection — and stream them to Sentinel and the Defender XDR portal.

Turn on foundational CSPM everywhere before you spend a cent. It is free, it seeds the asset inventory, and it lets you size the paid plans against real resource counts instead of guessing.

From 27 October 2026, foundational CSPM becomes opt-in for newly created Azure subscriptions (it stays $0). If a brand-new subscription shows an empty Secure Score, you must explicitly enable it — it is no longer on by default.

📋

02 — Prerequisites & Requirements

BEFORE YOU START

Defender for Cloud has no server to install — it is a first-party Azure service. What you need is the right role, the right resource providers registered, and (for Defender for Servers Plan 2) a Log Analytics workspace to land data in. The table below is the whole checklist.

RequirementDetailNotes
Azure subscription Any active subscription Free tier CSPM works on all; paid plans bill per resource.
RBAC role Owner or Contributor to enable plans Security Admin can change plans/policies; Security Reader is view-only.
Resource providers Microsoft.Security, Microsoft.PolicyInsights Microsoft.HybridCompute is also needed for Azure Arc onboarding.
Azure CLI 2.60+ min Needed for Methods 2 & 3. az upgrade to update.
Terraform 1.6+ with azurerm provider 3.x/4.x Optional — Method 3 only.
Log Analytics workspace One per region (recommended) Required for Defender for Servers Plan 2 file-integrity & 500 MB free data.
1
Confirm Your Role & Sign In
RBAC

Enabling Defender plans is a write operation on Microsoft.Security. You need Owner, Contributor or Security Admin at subscription scope. Sign in and confirm which subscription is active before you change anything.

SIGN IN & LIST SUBSCRIPTIONS
$ az login $ az account list --output table $ az account set --subscription "Production-Sub" # Confirm your role assignment on this subscription $ az role assignment list --assignee "$(az ad signed-in-user show --query id -o tsv)" \ --scope "/subscriptions/$(az account show --query id -o tsv)" \ --query "[].roleDefinitionName" -o table
2
Register the Required Resource Providers
One-Time

If Microsoft.Security is not registered on the subscription, plan enablement silently fails or hangs. Register the providers once; registration is idempotent and takes a minute or two to reach Registered.

REGISTER PROVIDERS
$ az provider register --namespace Microsoft.Security $ az provider register --namespace Microsoft.PolicyInsights $ az provider register --namespace Microsoft.HybridCompute # for Arc # Poll until state is "Registered" $ az provider show --namespace Microsoft.Security --query registrationState -o tsv

Do not skip provider registration on freshly created subscriptions. A missing Microsoft.Security registration is the single most common reason "enable all plans" appears to do nothing in automation.

🖥️

03 — Method 1: Enable via the Azure Portal

GUI · FASTEST START

The portal is the fastest way to get a single subscription protected and to see the interface you will be scripting against later. Everything lives under Environment settings. Before diving in, here is how the three enablement methods in this guide compare so you can pick the right one for your scale.

MethodBest forRepeatableDrift control
Azure Portal1 subscription, first look, demosNo — manual clicksNone
Azure CLIA few subs, quick scripts, pipelinesYes — scriptableWeak (no state)
Bicep / TerraformMany subs, audited estates, GitOpsYes — declarativeStrong (state + PR review)
1
Open Defender for Cloud
Portal

In the Azure portal, use the top search bar and type Microsoft Defender for Cloud. Pin it to your favourites — you will live here. The Overview blade shows the Secure Score, active recommendations, and any resources not yet covered by paid plans.

PORTAL PATH
portal.azure.com ▸ Microsoft Defender for Cloud ▸ Overview
2
Select the Subscription in Environment Settings
Scope

In the left menu choose Environment settings. You will see your management-group and subscription tree. Click the subscription you want to protect — plan enablement is per-subscription (you can also set it at the management-group level to cascade down, covered in Phase 9).

PORTAL PATH
Defender for Cloud ▸ Environment settings ▸ [Your subscription]
3
Turn On the Defender Plans
Plans

The Defender plans page lists every plan with an On/Off toggle. For maximum coverage flip the master toggle to Enable all plans, or toggle individual plans for tighter cost control. When a plan is On it is billed at the "Standard" tier; Off is "Free".

  • a
    Toggle Defender CSPM on to unlock agentless scanning and attack path analysis.
  • b
    Toggle Servers on, then click its plan link and choose Plan 1 or Plan 2.
  • c
    Toggle on the workload plans you use: Storage, Containers, Databases, App Service, Key Vault, Resource Manager, APIs.
  • d
    Click Save. Coverage begins within minutes; the first agentless scans complete within a few hours.

Every Defender plan has a "Settings" link exposing its sub-components — e.g. Servers → Agentless scanning, Vulnerability assessment, EDR integration. Enabling the plan enables sensible defaults; open Settings to fine-tune.

4
Confirm the Auto-Provisioning / Settings Components
Components

Under the same subscription blade, open Settings & monitoring. This controls what MDC deploys to workloads — the Log Analytics agent successor (Azure Monitor Agent), agentless scanning, and endpoint integration. Confirm Agentless scanning for machines is On and pick your Log Analytics workspace.

PORTAL PATH
[Subscription] ▸ Settings & monitoring ▸ Agentless scanning = On
5
Verify Coverage on the Overview Blade
Verify

Return to Overview. The "Defender for Cloud coverage" tile should now report your protected resource count, and the Secure Score begins recalculating. Recommendations populate as the first assessment cycle runs.

Portal Enablement Complete When
  • Environment settings shows plans as "On" for the subscription
  • Overview coverage tile shows a non-zero protected resource count
  • Secure Score displays a percentage (not "—")
  • Recommendations list is populating with MCSB findings
⌨️

04 — Method 2: Enable via the Azure CLI

REPEATABLE

Clicking toggles does not scale to dozens of subscriptions. The az security pricing command group enables the exact same plans from a script or pipeline. Each plan is a named resource; setting its tier to standard turns the plan on, free turns it off.

1
List the Current Plan State
Baseline

Before changing anything, capture the current tiers so you can diff and roll back. az security pricing list returns every plan and whether it is Free or Standard.

$ az security pricing list --query "value[].{Plan:name, Tier:pricingTier}" -o table # Example output Plan Tier ---------------- -------- VirtualMachines Free StorageAccounts Free CloudPosture Free Containers Free
2
Enable Defender CSPM & Core Plans
Create

The plan name for the paid CSPM tier is CloudPosture. Enable it first, then the workload plans. Each command is a "create" that updates the plan to the Standard tier.

ENABLE PAID CSPM + STORAGE + KEY VAULT + ARM
$ az security pricing create -n CloudPosture --tier standard $ az security pricing create -n StorageAccounts --tier standard $ az security pricing create -n KeyVaults --tier standard $ az security pricing create -n Arm --tier standard $ az security pricing create -n Dns --tier standard
3
Enable Defender for Servers Plan 2 with Extensions
Servers

Servers is the plan with the most knobs. Use --subplan to pick Plan 1 (endpoint-focused) or Plan 2 (adds file integrity monitoring, agentless scanning, JIT and 500 MB free data ingestion). The --extensions flag toggles sub-components like agentless VM scanning.

SERVERS PLAN 2 + AGENTLESS SCANNING
$ az security pricing create -n VirtualMachines --tier standard \ --subplan P2 \ --extensions name=AgentlessVmScanning isEnabled=True \ --extensions name=MdeDesignatedSubscription isEnabled=False

Plan 1 covers endpoint detection and response via Defender for Endpoint integration. Choose Plan 2 only where you need file integrity monitoring, agentless scanning or just-in-time VM access — it costs more per server.

4
Enable the Remaining Workload Plans
Batch

Loop the remaining plan names to switch everything on in one pass. This is the block you drop into a subscription-provisioning pipeline.

ENABLE ALL WORKLOAD PLANS IN A LOOP
$ for plan in Containers SqlServers AppServices OpenSourceRelationalDatabases CosmosDbs Api SqlServerVirtualMachines; do az security pricing create -n "$plan" --tier standard done

As of 5 July 2026, Microsoft blocked new onboarding through the plan-enablement API for five deprecated pricing plans. Existing subscriptions kept their access and billing, but do not script those legacy plan names into new automation — the call will error.

5
Verify the Final State
Verify

Re-run the list command. Every plan you enabled should now read Standard. Check an individual plan with show to confirm the subplan and extensions applied.

$ az security pricing list --query "value[].{Plan:name, Tier:pricingTier}" -o table $ az security pricing show -n VirtualMachines \ --query "{tier:pricingTier, subPlan:subPlan, ext:extensions}"
🧱

05 — Method 3: Bicep & Terraform (IaC)

AT SCALE

Infrastructure-as-Code is how you keep a hundred subscriptions identical and audit-able. Both Bicep (Azure-native) and Terraform (multicloud) model each Defender plan as a resource. Commit these files to Git and your MDC posture becomes a reviewable pull request.

1
Author the Bicep File
Bicep

Save the following as defender.bicep. It targets subscription scope and enables the key plans, including Servers Plan 2 with agentless scanning. Extend the array with any plan name from Method 2.

defender.bicep
targetScope = 'subscription' var plans = [ { name: 'CloudPosture', tier: 'Standard' } { name: 'StorageAccounts', tier: 'Standard' } { name: 'KeyVaults', tier: 'Standard' } { name: 'Containers', tier: 'Standard' } { name: 'Arm', tier: 'Standard' } ] resource workloadPlans 'Microsoft.Security/pricings@2024-01-01' = [for p in plans: { name: p.name properties: { pricingTier: p.tier } }] resource servers 'Microsoft.Security/pricings@2024-01-01' = { name: 'VirtualMachines' properties: { pricingTier: 'Standard' subPlan: 'P2' extensions: [ { name: 'AgentlessVmScanning', isEnabled: 'True' } ] } }
2
Deploy the Bicep at Subscription Scope
Deploy

Subscription-scoped deployments use az deployment sub create with a location for the deployment metadata (the plans themselves are global). Run a what-if first to preview the change.

$ az deployment sub what-if \ --location australiaeast \ --template-file defender.bicep $ az deployment sub create \ --location australiaeast \ --template-file defender.bicep \ --name defender-rollout
3
Or Author the Terraform Equivalent
Terraform

If your estate is multicloud, Terraform keeps Azure, AWS and GCP in one workflow. The azurerm_security_center_subscription_pricing resource maps one-to-one to a Defender plan via its resource_type argument.

defender.tf
terraform { required_providers { azurerm = { source = "hashicorp/azurerm", version = "~> 4.0" } } } provider "azurerm" { features {} } locals { plans = ["CloudPosture", "StorageAccounts", "KeyVaults", "Containers", "Arm"] } resource "azurerm_security_center_subscription_pricing" "plans" { for_each = toset(local.plans) tier = "Standard" resource_type = each.value } resource "azurerm_security_center_subscription_pricing" "vm" { tier = "Standard" resource_type = "VirtualMachines" subplan = "P2" extension { name = "AgentlessVmScanning" } }
4
Init, Plan & Apply
Apply

Standard Terraform loop. Always review the plan output — you should see one resource per Defender plan being created or updated.

$ terraform init $ terraform plan -out tfplan $ terraform apply tfplan

Do not manage the same plans in both Bicep and Terraform — or in IaC and a portal DINE policy — at once. Two controllers fighting over one plan resource produces perpetual drift and noisy deployment diffs. Pick one source of truth.

⚙️

06 — Initial Configuration

FIRST-RUN TUNING

Plans are on; now make the data useful. First-run configuration is about pointing MDC at the right benchmark, confirming agentless scanning has a workspace, and understanding the Secure Score you are about to spend months improving.

1
Confirm the MCSB Security Policy is Assigned
Policy

The Microsoft Cloud Security Benchmark is assigned by default at subscription scope — it is the initiative that drives your recommendations and Secure Score. Confirm it exists under Environment settings → Security policy. If you enabled MDC at management-group scope, the assignment should inherit down.

PORTAL PATH
[Subscription] ▸ Security policy ▸ Microsoft Cloud Security Benchmark = Enabled
2
Bind a Log Analytics Workspace
Data

Defender for Servers Plan 2 features and continuous export land in a Log Analytics workspace. Create one (or reuse your Sentinel workspace) and set it as the default for auto-provisioned data. Co-locating with Sentinel avoids cross-workspace query pain later.

$ az monitor log-analytics workspace create \ --resource-group rg-security \ --workspace-name law-defender \ --location australiaeast

Use one workspace per region and keep Defender for Cloud and Sentinel on the same workspace. It halves your ingestion configuration and lets a single KQL query span posture data and SIEM events.

3
Read Your Secure Score Baseline
Baseline

Secure Score is a weighted percentage of MCSB controls you satisfy. Each control groups related recommendations; fixing the highest-weighted, lowest-effort controls first gives the biggest score jump. Pull the current score and top recommendations from the CLI to snapshot your starting point.

$ az security secure-scores list \ --query "[].{name:displayName, score:score.percentage}" -o table $ az security assessment list \ --query "length([?status.code=='Unhealthy'])" # count of failing checks

ATTACK PATH ANALYSIS — Defender CSPM correlates individual findings into an exploitable chain.

💠

07 — Defender Plans Deep Dive

WHAT EACH PLAN BUYS

Cost control comes down to enabling the right plan on the right resource. Here is what each plan actually protects and its indicative billing model. Exact prices vary by region and currency — always confirm on the live pricing calculator before you commit budget.

Plan (CLI name)ProtectsKey FeaturesBilling model
CloudPostureAll resourcesAgentless scanning, attack paths, Cloud Security Explorer, secret scanningPer billable resource
VirtualMachinesAzure/Arc VMsP1: EDR integration · P2: +FIM, JIT, agentless, 500 MB free logsPer server/hour (~$15/server/mo P2 indicative)
StorageAccountsBlob/FilesMalware scanning on upload, sensitive data threat detectionPer storage account + per-GB scanned
ContainersAKS/ARO/EKS/GKERegistry image scanning, Kubernetes runtime threat detectionPer vCore
SqlServersAzure SQLVulnerability assessment, anomalous query & SQLi detectionPer SQL server/instance
KeyVaultsKey VaultAnomalous access & suspicious secret-enumeration alertsPer vault + per 10K transactions
ArmResource ManagerControl-plane abuse detection (e.g. suspicious role grants)Per subscription
ApiAPI ManagementAPI discovery, exposed-secret & abnormal-traffic detectionPer API
1
Decide Servers Plan 1 vs Plan 2
Sizing

Plan 1 is essentially Microsoft Defender for Endpoint provisioned to your servers plus its alerts, priced lower per machine. Plan 2 adds the posture-heavy capabilities. Map the decision to what you need: if you only want EDR, Plan 1; if you need file integrity monitoring, just-in-time access or agentless scanning, Plan 2.

CapabilityPlan 1Plan 2
Defender for Endpoint integration (EDR)✔✔
Vulnerability assessment✔✔
Agentless disk scanning—✔
File Integrity Monitoring (FIM)—✔
Just-in-Time VM access—✔
500 MB/day free log ingestion—✔
Relative cost per serverLowerHigher (~$15/mo indicative)

You can set the Servers plan at resource level, not just subscription level. Put Plan 2 on your crown-jewel servers and Plan 1 (or off) on ephemeral scale-set nodes to control spend.

2
Enable Storage Malware Scanning
Storage

The Storage plan's on-upload malware scanning is one of the highest-value, lowest-effort detections — it catches malicious files landing in blob containers that feed downstream apps. Enable the malware scanning component and cap the monthly GB to bound cost.

$ az security pricing create -n StorageAccounts --tier standard \ --subplan DefenderForStorageV2 \ --extensions name=OnUploadMalwareScanning isEnabled=True \ --extensions name=SensitiveDataDiscovery isEnabled=True
3
Estimate Cost Before You Scale
Cost

Because billing is per-resource, cost scales with your estate. Microsoft's 2026 commit-based option (Defender for Cloud Commit Units) offers discounts of up to roughly 22% versus pay-as-you-go if you can forecast usage. Model both before enabling estate-wide.

  • 1
    Use the free CSPM asset inventory to count VMs, storage accounts and SQL instances.
  • 2
    Multiply by the per-resource rate from the pricing calculator for your region.
  • 3
    Compare pay-as-you-go against a Commit Units tier for the same volume.

Defender for Storage per-GB scanning charges can spike on high-throughput accounts (log sinks, data-lake landing zones). Set the monthly scanning cap, and exclude buckets that only ever receive machine-generated data you already trust.

🔗

08 — Multicloud & Integration

AWS · GCP · ARC · SIEM

MDC is only a single-cloud tool if you leave it that way. The real value for most SOCs is one posture-and-detection pane across Azure, AWS, GCP and on-prem, feeding one SIEM. This phase connects the other clouds and pushes findings to Sentinel.

1
Onboard On-Prem & Other-Cloud Servers with Azure Arc
Arc

Azure Arc projects a non-Azure machine into Azure as a resource, so Defender for Servers can protect it. Install the Connected Machine agent on the target server, then connect it. Generate a service-principal or use device login for the connect step.

ON THE TARGET SERVER (LINUX)
$ wget https://aka.ms/azcmagent -O install_linux_azcmagent.sh $ bash install_linux_azcmagent.sh $ sudo azcmagent connect \ --resource-group rg-arc-servers \ --tenant-id <tenant-guid> \ --location australiaeast \ --subscription-id <sub-guid> # Verify the machine is now Arc-connected $ azcmagent show

Once a server shows up as an Arc "Connected Machine", enabling Defender for Servers at the subscription level automatically covers it — no separate MDC onboarding step for that host.

2
Add the AWS Connector
AWS

In Environment settings → Add environment → AWS, MDC generates a CloudFormation (or Terraform) template you deploy in the AWS account. As of the August 2026 update, the connector uses short-lived federated credentials — no long-lived AWS secret is stored — and offers a "least privilege" versus "default access" toggle. Choose least privilege unless you need full CWPP on EC2.

  • a
    Name the connector and enter the AWS account ID.
  • b
    Select plans to project: CSPM, Servers, Containers, Databases.
  • c
    Download the CloudFormation template and deploy it in the AWS account to create the federated role.
  • d
    Back in Azure, click Create. AWS resources appear in the inventory within a few hours.
3
Add the GCP Connector
GCP

The GCP flow mirrors AWS: Add environment → GCP, supply the organization or project ID, pick plans, and run the generated GCP Cloud Shell script that provisions a workload-identity federation. Like AWS, the 2026 flow dropped long-lived service-account keys in favour of short-lived federated tokens.

PORTAL PATH
Environment settings ▸ Add environment ▸ GCP ▸ run onboarding script in GCP Cloud Shell

Multicloud connectors need the federation role/identity to persist. If someone deletes the CloudFormation stack or GCP workload-identity pool, the connector goes stale and silently stops reporting — monitor connector health, not just Azure resources.

4
Stream Alerts to Microsoft Sentinel
SIEM

To correlate MDC alerts with the rest of your telemetry, connect them to Sentinel. Use the Tenant-based Microsoft Defender for Cloud data connector (or the Defender XDR connector) so alerts and, optionally, recommendations flow into the SecurityAlert table. You can also use continuous export for a raw feed.

CONTINUOUS EXPORT TO A LOG ANALYTICS WORKSPACE
$ az security automation create \ --name export-to-sentinel \ --resource-group rg-security \ --scopes "/subscriptions/<sub-guid>" \ --sources '[{"eventSource":"Alerts","ruleSets":[]}]' \ --actions '[{"actionType":"Workspace","workspaceResourceId":"<law-resource-id>"}]'
SENTINEL KQL — surface high/critical MDC alerts from the last 24h
SecurityAlert | where TimeGenerated > ago(24h) | where ProductName == "Microsoft Defender for Cloud" | where AlertSeverity in ("High", "Medium") | project TimeGenerated, AlertName, AlertSeverity, CompromisedEntity, Description | sort by TimeGenerated desc
🧠

09 — Advanced Configuration

POWER USER

Once the basics are live, the advanced controls turn MDC from a scorecard into an operational tool: hunting the resource graph, governing remediation with SLAs, adding compliance standards, and pulling code security into the same view.

1
Hunt with Cloud Security Explorer
Hunt

Cloud Security Explorer (a Defender CSPM feature) lets you query the security graph directly — "show me all internet-exposed VMs with a high-severity vulnerability and a managed identity that can read a storage account." You can reproduce much of the underlying inventory query with Azure Resource Graph for pipelines and reporting.

AZURE RESOURCE GRAPH — VMs WITH A PUBLIC IP
$ az graph query -q "Resources | where type =~ 'microsoft.compute/virtualmachines' | join kind=leftouter (Resources | where type =~ 'microsoft.network/publicipaddresses') on \$left.id == \$right.properties.ipConfiguration.id | project vm=name, location, hasPublicIp=isnotnull(name1)"
2
Add Governance Rules & Compliance Standards
Governance

Governance rules assign owners and remediation due-dates to recommendations, so findings do not rot. Under Environment settings → Governance rules create a rule that auto-assigns any new high-severity recommendation to the resource owner with a 14-day SLA. Then add the compliance standards you are audited against under Regulatory compliance.

  • a
    Governance rules → New rule → scope to subscription, severity = High, SLA = 14 days.
  • b
    Regulatory compliance → Manage compliance policies → add CIS, NIST 800-53 or PCI-DSS.
  • c
    Use exemptions for accepted risks so they stop dragging the score — with a justification and expiry.

Set an expiry on every exemption. A permanent exemption is an invisible risk acceptance that no one revisits; a 90-day expiry forces the conversation again.

3
Connect DevOps Security (GitHub / Azure DevOps)
DevSecOps

The DevOps security connector brings code, secret and IaC scanning findings from your repositories into the same Defender for Cloud recommendations view — shifting posture left of deployment. Add it under Environment settings → Add environment → GitHub / Azure DevOps and authorize the connection.

PORTAL PATH
Environment settings ▸ Add environment ▸ Azure DevOps / GitHub ▸ Authorize + select org
📈

10 — Monitoring, Maintenance & Troubleshooting

DAY-2 OPS

Day-2 is where value is realised or lost. Prove alerts fire, watch the score trend, automate the boring responses, and know how to debug the handful of things that commonly break.

1
Validate Alerts with a Sample Alert
Test

Before you trust MDC in an incident, prove the pipeline end to end. The Security alerts blade has a Sample alerts button that injects benign test alerts for each enabled plan — confirm they appear in MDC, in Sentinel's SecurityAlert table, and trigger your automation.

$ az security alert list \ --query "[?properties.severity=='High'].{name:properties.alertDisplayName, entity:properties.compromisedEntity}" -o table

Run a sample alert on the same day you connect Sentinel. It is the cleanest way to confirm the connector, the ingestion delay, and any analytics rule that should fire — all at once.

2
Automate Response with Workflow Automation
SOAR

Workflow automation ties a Logic App to an alert or recommendation trigger — post to Teams, open a ticket, isolate a VM. Configure it under Environment settings → Workflow automation, bind it to the alert severity you care about, and point it at a Logic App.

  • a
    Create a Logic App with the "When a Defender for Cloud alert is created" trigger.
  • b
    Workflow automation → New → scope to subscription, condition Severity = High.
  • c
    Select the Logic App as the action and save. Test it with a sample alert.

Common Errors & Fixes

SymptomLikely CauseFix
"Enable all plans" does nothing in a scriptMicrosoft.Security provider not registeredaz provider register --namespace Microsoft.Security, wait for Registered.
Secure Score shows "—" on a new subFoundational CSPM opt-in (post-27 Oct 2026)Explicitly enable foundational CSPM on the subscription.
Arc server not covered by DefenderServers plan off, or agent not connectedConfirm azcmagent show = Connected and Servers plan = Standard.
AWS/GCP resources stopped appearingFederation role/stack deletedRedeploy the connector's CloudFormation / workload-identity, check connector health.
No alerts reaching SentinelData connector not enabled or wrong workspaceEnable the Tenant-based MDC connector; verify continuous export workspace ID.
Unexpected Defender for Storage billPer-GB scanning on a high-throughput accountSet monthly scanning cap; exclude trusted machine-data buckets.
CLI: plan name not acceptedDeprecated legacy plan (post-5 Jul 2026)Use a current plan name; remove legacy names from automation.

Enabling a plan bills immediately, but disabling does not refund retroactively. When testing in a lab subscription, script the teardown (az security pricing create -n <plan> --tier free) into your cleanup so a forgotten Plan 2 does not quietly accrue charges.

📚

11 — Sources & References

DOCS

Official Microsoft documentation for the commands, plans and connectors used in this guide. Always confirm current pricing on the live calculator before committing budget.

Microsoft Learn — Defender for Cloud overview (CNAPP, CSPM & CWPP) Microsoft Learn — az security pricing CLI reference Microsoft Learn — Enable Defender plans Microsoft Learn — Connect AWS accounts Microsoft Learn — Connect GCP projects Microsoft Learn — Onboard servers with Azure Arc (azcmagent) Terraform Registry — azurerm_security_center_subscription_pricing Microsoft Azure — Defender for Cloud pricing calculator

Take Your Cloud Defence Further

You have MDC grading and defending your estate. Pair it with a SIEM you actually hunt in — our Sentinel and detection-engineering guides pick up exactly where this one ends.

📝 More Guides 📚 Browse Courses

◈ Stay Connected

Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.

🌐 Website ▶️ YouTube ▶️ YouTube (2) 𝕏 Twitter / X ♪ TikTok ✈️ Telegram
🔍 IOC Scanner 🛠️ Live Tools 📚 Courses 🚨 Threat Intel 📝 Blog 📋 SOPs

"They can't exploit you if you are the Exploit."