Onboard Defender for Cloud with Azure Policy: verify what the policy proves
Episode 4 of the series Cloud Security – Microsoft Defender
A policy assignment is a way to express and apply an intended configuration. It is not, by itself, evidence that every workload has the protection the application needs. Before rolling Defender for Cloud across a management group, establish exactly what the chosen definition checks and what its deployment changes.
Episode 3 made the plan decision for Orders Demo, our hypothetical application. This week, the platform team wants a repeatable onboarding process for subscriptions. The proposed rollout and records below are illustrative; no management group, policy assignment, paid plan or tenant setting was changed for this article.
Start with the meaning of compliant
Microsoft’s management-group onboarding guide uses the built-in definition Enable Microsoft Defender for Cloud on your subscription. At preparation time, the policy reference links version 1.0.1, definition ID ac076320-ddcf-4066-b451-6154267e8ad2.
Read the actual definition, not just its display name. It evaluates subscriptions and checks the Microsoft.Security/pricings resource named VirtualMachines. Its existence condition accepts either free or standard. Its deployment writes free. The definition has no parameters and uses the deployIfNotExists effect.
That makes it a basic registration policy. A subscription can be compliant while paid protection is off. Changing the compliance condition to require standard and changing the deployment to enable a paid plan are different edits; doing one does not establish the other. Treat either as a separately reviewed policy and commercial decision, not a harmless way to make a dashboard greener.
For Orders Demo, keep the registration requirement separate from the plan and component requirements agreed in Episode 3. The owner should be able to explain each result without treating every compliant resource as fully protected.
| Observation | What it establishes | What still needs checking |
|---|---|---|
| Assignment exists | A definition was assigned at a scope | Effective scope, exclusions, identity and evaluation |
| Registration policy is compliant | Its existence condition was satisfied | Required paid plans, components and workload support |
| Remediation deployment succeeded | The deployment completed | Effective configuration and expected collection |
| Selected plan is enabled | A plan setting is on | Component prerequisites, visibility, costs and operational ownership |
Give scope and remediation an owner
A management-group assignment has a wider reach than a subscription pilot. Identify the subscriptions that inherit it, the assignment’s exclusions and other assignments that may apply. Record who owns the definition, who approves scope expansion and who receives failures. Choose a pilot scope that can exercise the required path without accidentally turning the entire estate into the test.
The onboarding guide requires Microsoft.Security registration at the management-group scope and describes the Azure Policy route: locate the definition, select Assign, set the management-group scope, review Remediation, then Review + create. These are change steps for an authorized implementation, not actions already carried out here. Do not copy an incomplete example command with an ellipsis as though it were ready to run.
The guide names Security Admin permissions. Also establish the rights needed for the policy assignment and for granting its identity the required Azure roles at the chosen scope. Defender permissions distinguish read-only review from plan and resource changes. Security Reader visibility does not make a reviewer a rollout operator.
A deployIfNotExists policy needs a managed identity for remediation. Inspect its roleDefinitionIds and the identity’s effective role assignments. The remediation guidance explains that the portal can grant the specified roles during assignment, while SDK-based creation requires the grants to be handled separately. Changing a definition later does not automatically update the assignment’s identity permissions. Keep those permissions as narrow as the deployment requires.
Stage the rollout and account for existing subscriptions
Evaluation and remediation are separate outcomes. During a policy evaluation cycle, matching existing resources can be marked non-compliant without being changed. A remediation task applies the deployment to existing non-compliant subscriptions. Do not interpret an assignment’s creation, or an evaluation result alone, as completed onboarding.
For the pilot, retain the assignment and definition IDs, version, scope, identity and baseline configuration. Review the proposed remediation target list before starting it. After an authorized run, compare the task’s deployment results with the subscription’s actual registration and plan settings. A failed deployment needs a specific owner and explanation; repeatedly creating tasks without understanding the permission or scope error adds noise.
Then use a small canary group with a different ownership or subscription pattern before expanding. Include a newly introduced subscription in the acceptance plan. The selected definition’s own description calls for remediation of newly created subscriptions; do not assume inheritance gives immediate, complete onboarding in every lifecycle path.
Use policy exemptions deliberately where appropriate. Record why the exception exists, who accepted it, when it should be reviewed and what compensating arrangement applies. An exemption changes how a resource is treated for that assignment. It does not remove the underlying security requirement.
Keep paid plans and portal transfer separate
This registration policy is not a substitute for a plan-specific rollout. Before enabling chargeable protection, review the current pricing, required components, resource coverage and the existing plan configuration. Document the expected billing scope and the person checking consumption. This article supplies no fixed cost or automatic saving.
Also identify where plan management currently lives. The Defender portal plan-management experience remains preview in the documentation checked for this article. It has separate role and environment requirements. Transition can move plan enablement and Defender workload unit billing, and resource-level plan configurations are not preserved. Global enablement can affect current and future connected environments.
The management-group onboarding guide explicitly distinguishes Azure Policy registration from connecting an environment to that portal experience. Keep the transfer out of the registration pilot unless it has its own approved design. A shared product name does not make the two procedures interchangeable. Recheck the release notes and current feature guidance before implementation.
Expand only when the evidence explains the result
A suggested acceptance record for each stage is small enough to review with the platform and application owners:
| Field | Evidence to prepare or collect |
|---|---|
| Intended state | Registration, required plans and components recorded separately |
| Assignment | Definition/version, scope, exclusions and managed identity |
| Execution | Evaluated targets, remediation results and failed deployments |
| Observed state | Actual registration, plan/component settings and expected visibility |
| Decision | Expand or hold, unresolved gaps, exception owner and cost review |
Before authorizing changes, agree how to stop expansion and handle unintended configuration. Removing an assignment does not, by itself, reverse changes already deployed. The return procedure must consider both effective settings and any other automation that could reapply them.
The proposed exercise is to prepare this record for one pilot scope and compare the intended state with the definition’s actual test. No deployment or recovery exercise was executed. A useful rollout is one another operator can explain: what was assigned, what changed, what remains unprotected and why the next stage is justified.
Cheers,
Marcos Nogueira
Connect with me on LinkedIn