Endpoint hardening · Intune as code

An endpoint baseline where every setting is audit evidence

222 Intune policies across Windows, Windows Server, macOS and Linux, built to replace a paid registry-level hardening agent. Every policy carries its NIST SP 800-53 control and ISO 27001 clause, the 24 that will change somebody's working day each have a written decision, and nothing reaches the whole fleet until a pilot ring has run clean.

222 policies · 5 platforms Defender for Endpoint included Microsoft Graph + Terraform 31 NIST controls · 16 ISO clauses Deployed and verified in a live tenant Decision register run through with the customer
Watch the walkthrough
212
policies deployed to a live tenant and verified: 0 missing, 0 unassigned
89%
mapped to NIST and ISO. The other 24 are left blank rather than guessed
24
controls that change how people work, each with a written decision
0
standing access. The deploy credential is deleted after every engagement

Built from running commercial hardening agents at an MSSP, and from wanting the same outcome natively, with the audit mapping built in rather than bolted on.

BUILD run once per change to the baseline Source pack exported policy JSON and the framework workbook Build step cleans, sorts into 5 shapes, attaches NIST and ISO Release manifest 222 policies, released only once coverage + offline replay pass read by emits the only thing the deploy reads EVERY TENANT own config, own groups, own credential Terraform 9 assignment groups, plus 3 when a platform is promoted Customer config tenant ID, approved extensions, validated before any Graph call Deploy script create or update each policy by name, then assign it to the current rollout tier Intune tenant 222 policies, 5 Graph shapes each on Pilot, Static or Dynamic for its platform break-glass excluded from every assignment nothing on All Devices Graph app-only Verification pass diffs the live tenant against the manifest then, separately reads via Graph
The build turns a source pack into one manifest, and nothing is released until a coverage check and an offline replay of the whole deploy have passed. Per tenant, Terraform owns the groups, a validated config file supplies the handful of values that differ between customers, and the deploy script owns the policies. Verification is a separate script that reads the tenant back, so "the deploy finished" and "the tenant is right" are two different claims checked two different ways.
◆ The rule the whole thing rests on

Nothing is inferred. A guessed control mapping is manufactured audit evidence.

Every NIST and ISO value is copied verbatim from the source workbook. Where the workbook holds nothing, the policy is marked UNMAPPED and the cells stay blank. No control was derived from a policy's name or filled in by analogy, which is why coverage reports as 89% rather than 100%.

✓ 198 mapped, 24 unmapped. The unmapped ones deploy correctly. The gap is documentation, not configuration.
✓ Every mapping is traceable to how it was matched, so any row can be spot-checked.
✓ Coverage figures are formulas, not typed-in numbers. Fill the gap and they move on their own.

Where it stands. The 212 Windows, Server and Linux policies have been deployed to a live test tenant and verified, with the bugs that took to find written up in section 08. The 188 Windows workstation policies were then tested on virtual machines: 182 applied cleanly, and the rest are covered in section 08. The 10 macOS profiles wait on a tenant-specific Defender onboarding file. It isn't yet running in a business.

222
policies. 188 Windows workstation · 22 Server · 10 macOS · 2 Linux, counted the way the deploy routes them
212
deployed and verified live on 8 September 2026. The 10 macOS profiles wait on the per-tenant onboarding file
5
Graph shapes. 202 catalogue · 10 macOS · 7 legacy · 2 intents · 1 compliance
9 + 3
groups. 4 pilot, 4 static, 1 break-glass, and up to 3 dynamic on promotion
24
decision-register controls. 10 High · 10 Medium · 4 Low
3
Graph application permissions on one app registration, deleted after the engagement
31 · 16
distinct NIST 800-53 Rev 5 controls · ISO 27001:2022 Annex A clauses
61
Defender for Endpoint policies. Windows and Linux 29 · Server 22 · macOS 10
16
categories, each routed to the right platform group by the deploy
01

Why build it rather than buy the agent

The MSSP I work in runs commercial hardening agents that operate at the registry level. They work. This started as a question about whether the same outcome was reachable natively, and turned into a different question halfway through.

The first half is the obvious one. A paid agent is another thing installed on every endpoint, another console, another renewal, and another vendor between you and the operating system. Intune can set most of the same things through the settings catalogue and Endpoint Security profiles, with no agent to deploy and no separate licence. That part is just an architecture and cost argument, and it's not very interesting.

The second half is the one that changed the build. Both the agent and the raw CIS benchmark answer the same question: how hardened is this device, scored against a benchmark. That's a useful number and it is not audit evidence. When an auditor arrives they don't ask for a CIS score. They ask you to evidence AC-11, or Annex A 8.7, and a benchmark score doesn't answer that question in either direction.

So every policy in this build carries its NIST SP 800-53 Rev 5 control and its ISO/IEC 27001:2022 clause. Across 222 policies that resolves to 31 distinct NIST controls and 16 ISO clauses. The hardening work doubles as the audit evidence rather than sitting in a separate spreadsheet nobody opens until the week before an assessment.

Why I built it this way round

I'm working through NIST and ISO properly at the moment, and mapping 222 real policies to real controls is a far better way to learn a framework than reading it. You find out quickly which controls are thin, which ones several policies pile onto, and which ones nothing in an endpoint baseline touches at all.

02

Two tools, and why

Terraform owns the who. Microsoft Graph owns the what. That split is the one place this differs in shape from my Conditional Access baseline rather than just in content.

The Conditional Access build is one terraform apply start to finish. This one isn't, and the reason is narrower than "Terraform wasn't right for it."

Terraform deploys the device assignment groups. Plain Entra objects, handled identically by any provider, and exactly the kind of interdependent thing state and ordering are good at. A PowerShell deploy script calls Microsoft Graph for the 222 policies, with request bodies generated from the source pack on every build rather than hand-edited. Assignments wire up by group display name, so no GUIDs get copied between the two tools by hand.

Why not a Terraform provider for the policies too

Because there isn't an official one. configurationPolicies, deviceConfigurations, intents and compliancePolicies aren't resources that hashicorp/azuread or hashicorp/azurerm know how to manage, and the gap is tracked and unresolved. The providers that do cover Intune are small community projects wrapping the same beta Graph API this deploy script calls directly.

So the question isn't Terraform versus PowerShell. It's whether to put a third-party dependency in the path, and there were four reasons not to:

Cost of a community providerWhat it buys instead
Its code runs with app-only credentials against every customer tenantMicrosoft's own Graph PowerShell authentication module, calling the REST contract Microsoft documents directly rather than depending on the fast-changing beta cmdlet module. Nobody unvetted sits between the deploy and a tenant
"Our tooling depends on a solo-maintained GitHub project" is a hard sentence in a NIST and ISO-mapped engagement"Microsoft's SDK and HashiCorp's own provider" is a clean one, and it's the same answer the Conditional Access baseline already gives
Beta Graph endpoints change often, and a small provider can lag a fix by weeksRequest bodies come straight from the source pack, so there's no intermediate schema waiting on somebody else's release
It breaks a precedent already setThe CA baseline pushed its one Terraform-unsupported object out to a scripted step rather than reach for a workaround provider. Same rule here, at 222 objects instead of one
The cost of that choice

Everything Terraform would have given for free had to be built. No plan diff before anything touches a tenant. No state file. No idempotency out of the box. The deploy script finds each policy by name and either creates or updates it, a separate verification script stands in for drift detection, and an offline replay of the whole deploy against a mocked Graph stands in for plan. That's more code to own, and section 08 is what owning it looked like the first time it met a real tenant.

No standing access, ever

One app registration serves both tools, scoped to three Graph application permissions (DeviceManagementConfiguration.ReadWrite.All, Group.ReadWrite.All and Application.Read.All, deliberately with no managed-device or app permissions), and it gets deleted at the end of every engagement rather than at the end of the demo.

The reason is specific rather than hygienic. DeviceManagementConfiguration.ReadWrite.All is a tenant-wide application permission. It isn't scoped to the 222 policies this deployment touches, it reaches everything. A live credential with that much reach sitting unused between engagements is precisely the orphaned automation access a security review exists to find.

The baseline outlives the credential. Groups and policies are independent objects, so deleting the app registration doesn't touch them. What goes away is the standing ability to reconfigure a customer's tenant from outside their own admin workflow. Coming back later means a fresh registration: the deploy script recognises the policies already there by name and updates them in place of creating duplicates.

The credential is handled the same way at every step. Terraform's credentials live only in the current terminal session, never in a saved profile, so a live secret doesn't sit around after the tab closes. Every customer gets a fresh copy of the project in its own folder, which is what stops last week's customer config or a stale secret being applied against the wrong tenant. At close-out the deletion of the app registration is confirmed by querying for it rather than trusting the click, and the local secret file, customer config and Terraform state come out of the customer folder once the engagement record has what it needs. A dead secret sitting in a folder is still a dead secret sitting in a folder.

The safety defaults

A licensing check runs first. It stops outright if the tenant has no Intune, and warns if Defender for Endpoint isn't there, because the Defender policies will still create in Intune but the agent side won't do anything and that's a scoping conversation, not an error. The customer config is validated before a single Graph call, and refuses to proceed while any of the values that differ per tenant still hold a placeholder. The whole pack replays offline before it touches a tenant. Rollout stage defaults to Pilot, and the flag that puts the riskiest Attack Surface Reduction rules into audit mode defaults to on, so enforcement is something you ask for rather than something you forget to prevent.

All of it is written up as a deployment guide for an engineer who has never run the project, taking an empty machine to a deployed tenant in roughly 100 to 140 minutes on a first run. Terraform isn't assumed, and every step is tagged by where it happens: the terminal, the deploy script, the portal or a file.

The ten rules the design follows

  1. Nothing is inferred. NIST and ISO values are copied verbatim from the workbook. Blank rows stay blank and the policy is marked unmapped.
  2. Fix the source, then rebuild. Nothing in the built pack is hand-edited. The webshell ASR fix went into the source JSON and the pack was regenerated.
  3. Never All Devices. Every policy is assigned to exactly one tier group for its platform.
  4. Break-glass excluded from every assignment, at every tier. One group, deliberately not split per platform.
  5. Validate before the first Graph call. The config check throws while any required value is still a placeholder.
  6. No standing access. One app registration, three permissions, deleted at the end of the engagement.
  7. Safe defaults. Rollout stage defaults to Pilot, audit mode for flagged policies defaults to on, and every dynamic flag defaults to off.
  8. Replay offline before any deploy, in both create and update mode. The update path doesn't run in a tenant until the second deploy.
  9. Verify separately, as the same identity. Verification reuses the existing app-only session rather than signing in itself, so it checks the tenant you deployed to.
  10. Promotion is additive. Dynamic is a new group, never the static one converted.
03

What's in it, and the 24 that matter

It isn't a Windows workstation baseline. Five platforms, two browsers, and Defender for Endpoint on everything that can run it.

PlatformPoliciesNotes
Windows 1181CIS benchmark hardening, ASR, credential protection, audit and logging
Microsoft Edge79The largest single block, and where the user-facing pain concentrates
Windows Server21Defender for Endpoint, server-appropriate rather than workstation settings copied across
macOS10Defender for Endpoint plus platform best practice, delivered as custom configuration profiles
Google Chrome6CIS browser benchmark, because nobody runs one browser
Linux1Defender for Endpoint. Thin, and named as thin
Unmapped24Deploy correctly, no framework documentation. See section 06

This is the workbook's platform view, so Edge and Chrome sit apart from Windows and the 24 unmapped policies have their own row. The deploy routes by category instead, which gives 188 workstation, 22 Server, 10 macOS and 2 Linux. Both are right: the one Server policy missing from this table is unmapped.

Defender for Endpoint accounts for 61 of the 222, split across Windows and Linux, Windows Server, and macOS. That's the part most Intune hardening packs leave out entirely, because MDE configuration usually lives in its own console and its own project. Folding it in means one baseline covers the endpoint agent and the operating system underneath it rather than assuming somebody else did half the job.

Where the policies sitCount
Edge CIS benchmark77
Windows CIS benchmark hardening30
Defender for Endpoint, Windows and Linux29
Defender for Endpoint, Windows Server22
Audit and logging11
Defender for Endpoint, macOS10
Privacy and AI data governance9
Patch management · passwordless · Chrome CIS · modern workplace and resilience20
Data encryption · tenant and account access · removable media · identity · firewall14

Nine policies cover privacy and AI data governance, which didn't exist as a category in an endpoint baseline two years ago and now has to. Copilot, Click To Do and Recall are all configurable, and all of them are decisions with a licensing consequence rather than security defaults you can quietly switch off.

They arrive as five different Graph object shapes: 202 settings catalogue policies, 10 macOS custom configuration profiles, 7 legacy device configurations, 2 Endpoint Security intents and 1 compliance policy. Each shape has its own endpoint and its own rules for what an update is allowed to change. A pack that's genuinely one object type is a folder import, and this isn't.

16The 16 categories
#CategoryPoliciesWhat's in it
01Defender for Endpoint29Windows and Linux. ASR rules, AV, SmartScreen, the MDE device tag
02Windows CIS hardening30UAC, Credential Guard, LSA, Protected Print, NTLM and SMB
03Audit and logging11Advanced audit policy, event log sizes
04Identity and auth2Includes the Account Protection intent
05Tenant and account access3OneDrive and Teams tenant restrictions
06Data encryption4BitLocker intent, BitLocker To Go, and the Linux compliance policy
07Firewall and network2Firewall profiles, WinRM basic auth off
08Removable media3Device Control, USB write deny, DMA
09Patch management5Update rings, feature update deferral
10Privacy and AI governance9Copilot, Click To Do, Recall. A licensing decision
11Edge CIS77The biggest block and most of the user pain
12Passwordless5Windows Hello for Business and FIDO
13Chrome CIS5Extension allow list and site isolation
14Modern workplace5Health monitoring, Quick Machine Recovery
15Defender, Windows Server22Server ASR including a constructed Exchange webshell rule. No dynamic tier
16Defender, macOS10Custom configuration profiles with a fixed deploy order
5The five Graph shapes, and how each one updates
Shape#CreateUpdate
Settings catalogue202POST the bodyRecreate: create new, assign, delete old. Settings can't be patched
Compliance1POST, then scheduled actions (block after a 24h grace)Same recreate path. Not yet exercised live
Legacy device configuration7POST the bodyPATCH works here
Endpoint Security intent2One createInstance call, settings in settingsDeltaPATCH name and description, then updateSettings with settings
macOS custom configuration10Built from a base64 .mobileconfig payloadPATCH, via the legacy path

Every shape then goes through the same /assign call, and /assign replaces the whole assignment set rather than appending to it. That's why moving a tier is a clean swap rather than an accumulation of groups, and why the include and the break-glass exclusion always go in the same request.

Then the 24

Most hardening guidance is written for a generic Windows fleet. Nobody has a generic fleet.

The client profile this was scoped against has CAD engineers with large-format plotters and licence dongles, a small dev team running VMs and build scripts, and a couple of hundred office staff whose day depends on the browser behaving the way it did yesterday. The same policy nobody notices on an office laptop will stop a plotter dead, or leave a developer unable to start a VM with no way to fix it remotely.

So all 222 got read for operational impact, and 24 came out as controls that change something a user or a service desk will notice. Not what the policy could theoretically do. What this specific configuration does, to these people, on these machines.

Severity means operational impact, not security value

A High on the register means it's likely to generate calls. It doesn't mean the control matters more. Conflating those two is how hardening projects end up arguing about the wrong thing, because the security team reads severity as importance and the IT manager reads it as risk to the business, and they're having different conversations without noticing.

The other 198 deploy quietly and need nothing from anyone. That ratio is the useful number to hand an IT manager, because "we're deploying 222 hardening policies" sounds like a fleet-wide outage waiting to happen, and "24 of these will change how your people work, here they are" is a conversation you can actually have.

04

Four answers, and the one that matters

Each of the 24 goes back to the client with the same four options.

Nothing deploys until the customer has been through it

The register is a customer-facing document, and I run through it with the customer's IT manager before anything goes near a device. It opens with why we're asking first: a fair chunk of this would break something, and they'd otherwise find out from their users rather than from us. It explains the pilot, static and dynamic rollout in their terms, and that break-glass devices are excluded at every stage. Where CIS offers Level 1 and Level 2, L1 is the default and L2 is treated as a decision rather than an automatic yes.

It also asks the two questions that sit outside the register: where they stand on local admin rights, including whether LAPS or an admin-by-request tool is in place, and what their Defender device tag should be. When it comes back, the pilot is scoped to their answers. Compensating controls are recorded against the relevant NIST and ISO controls so framework coverage stays evidenced, and accepted risks go on their risk register with the owner and review date they've given. We'd still expect the pilot to surface one or two things the document didn't predict, which is exactly what it's for.

Option 1

Deploy as is

The impact is acceptable. Switch it on.

Option 2

Deploy with an exception

Switch it on, exclude a named group. Usually the CAD workstations or the dev team. The exception is recorded, not remembered.

Option 3

Compensating control

Don't deploy it, because something already in the stack covers the same risk. Name that control and it gets recorded against the framework mapping, so the audit position stays intact without paying the operational cost. This is the option most registers don't offer, and it's the one that gets a hardening project signed off.

Option 4

Accepted risk

Don't deploy it, and nothing else covers it. Completely legitimate, and it needs a named owner and a review date, because without those it becomes an audit finding rather than a decision.

Blank is also an allowed answer, and it's more useful than a guess. An IT manager who isn't sure whether their meeting rooms rely on browser casting should say so rather than pick one, because that uncertainty is the thing the pilot is for.

The reason four options beats two is that "deploy or don't" forces every contested control into a fight between security and productivity. Options three and four turn most of those into a record instead. Something already covers this, or somebody owns the fact that nothing does.

05

What actually breaks

Four of the 24, to show the shape. Each one is a control worth having and a real cost, which is exactly why it can't be decided from outside the business.

Control
What it costs
Windows Protected Print Mode
Only Mopria-certified IPP printers work. Third-party print drivers disabled.
Large-format plotters stop. Most MFP finishing goes with it: stapling, booklet, secure print release. In an engineering firm that's not a minor inconvenience, it's the output of the business.
UAC set to auto-deny for standard users
No elevation prompt at all. The action returns access denied.
The service desk can't talk a user through entering admin credentials, because there's no prompt to enter them into. You need LAPS or an admin-by-request tool in place first, or you've removed your own escalation path.
Credential Guard with UEFI lock
On, and locked at firmware level so it can't be turned off remotely.
If it clashes with a developer's VM or older hardware, the only fix is physical access to that machine's firmware. Across a distributed fleet that's an operational problem, not a theoretical one.
Edge file selection dialogs blocked
CIS Level 2. The file picker is disabled in the browser.
No attaching to webmail, no uploading a drawing to a client portal, no upload in SharePoint or Teams web. There's no client-side fix and it isn't a fault. Four of the highest-impact controls are L2, and dropping the Edge L2 set removes most of the user-facing pain for very little benchmark cost.

Writing these up properly is most of the work. The register says what breaks, who it hits, what the user will report it as, whether the desk should treat it as expected or a fault, and when it first bites. That last column matters more than it looks, because a control that fails the first time someone tries to upload a file lands very differently from one that fails quietly three weeks later.

24The full decision register
#ControlSeverityWhat it costs
01Windows Protected Print ModeHighPlotters and MFP finishing (staple, booklet, PIN release) stop on day one
02UAC auto-deny for standard usersHighNo prompt to type admin creds into. Needs LAPS or admin-by-request first
03Credential Guard with UEFI lockHighOnly fix is physical firmware access. Suggest piloting without the lock
04Device Control on removable mediaHighNo USB writes. DMA block can hit Thunderbolt docks on CAD machines
05Extension allow lists, Edge and ChromeHighDefault deny. VPN clients, password managers, accessibility tools blocked unless listed
06Edge file selection dialogs blocked (L2)HighNo upload or attach in the browser. Most disruptive for office staff
07Edge microphone blocked (L2)HighBrowser Teams, Zoom, Meet have no audio. Guests and BYOD hit it
08Edge screen capture blocked (L2)HighBrowser screen share stops. Can break the desk's own remote support
09NTLMv2 only, SMBv1 off, SMB signingHighScan-to-folder MFPs, old NAS. Signing slows big CAD assemblies
10WHfB with multi-factor unlockHighNo TPM 2.0 means it silently stays on passwords. Towers lack biometrics
11Windows Security app hiddenMediumUsers can't see protection state. Desk loses a triage step
12Edge cert warning override off (L2)MediumSelf-signed admin pages (NAS, printers, licence servers) unreachable
13Defender cloud protection High PlusMediumNiche CAD plugins flagged, no local exclusions, network scan latency
14LSA protection with UEFI lockMediumSame reversal problem. Breaks some SSO agents and RMM helpers
15ASR: unsigned processes from USBMediumOnly ASR rule shipping in block mode. Catches dongle helpers
16WinRM basic auth offMediumMost likely to break your own management tooling. Check first
17Edge password manager, sync, import offMediumPassword reset spike unless a corporate manager is in use
18Edge ClickOnce, DirectInvoke, IE modeMediumLegacy ERP or document management launches break
19BitLocker To GoMediumUnencrypted USB goes read-only. Stacks with 04
20Copilot in Windows offMediumRemoves paid M365 Copilot. Business decision, never deployed unconfirmed
21Controlled Folder Access, auditLowBlocks nothing. Notifications users call virus warnings
22Screen lock after 15 minLowLocks during long renders or plots
23RDP idle limit 15 minLowOnly long jobs on shared boxes
24Edge InPrivate, Cast, profiles offLowMeeting room casting, second profile for a client tenant

Dropping the Edge L2 set is one decision that removes most of the user pain: 06, 07, 08 and 12 are all L2.

Two more artefacts sit behind the register: an operational impact view (who it hits, what the user reports, expected or fault, when it bites) and a service desk brief generated from the same source, so the two can't drift apart.

06

The mapping, and refusing to guess

The framework values come from a source workbook that keys on policy name, while the pack keys on filename, and the two had drifted. Matching ran a ladder from strictest to loosest: exact string first, then whitespace normalisation, then punctuation, then rule-name prefixes. 164 matched exactly. 34 needed one of the looser rules. Every policy resolved deterministically to exactly one row, and the method used is recorded per policy so any mapping can be spot-checked rather than trusted.

24 policies have no framework mapping at all, because their workbook rows are numbered and entirely blank. They deploy correctly. What's missing is the documentation, and filling those cells by reasoning from the policy name would have been easy, fast, and completely wrong. A mapping invented by analogy is audit evidence that was manufactured rather than recorded, and it fails the moment someone checks it against the source.

So coverage reports as 89%. It would be trivial to make that number 100% and worthless.

Match methodPoliciesMeaning
Exact164Workbook name equals filename, character for character
Punctuation14After normalising punctuation, file extensions, timestamps and a mangled curly apostrophe
Whitespace10After collapsing double spaces and trimming
Prefix10After normalising a rule-name prefix
Unmapped24Workbook row numbered but blank
Most-cited NIST 800-53 controls
SI-3 Malicious code protection · 53
CM-7 Least functionality · 39
SI-16 Memory protection · 20
SC-8 Transmission confidentiality · 19
SI-7 Software integrity · 18
SI-2 Flaw remediation · 17
IA-5 Authenticator management · 13
Most-cited ISO 27001 Annex A clauses
8.7 Protection against malware · 65
8.9 Configuration management · 39
8.5 Secure authentication · 23
8.20 Network security · 21
8.8 Technical vulnerabilities · 17
8.15 Logging · 10

One gap I found while writing this up. The build attaches the framework row to the release manifest by exact filename only, so the manifest carries NIST and ISO for 164 policies, not 198. The 34 looser matches exist only in the mapping workbook. Anything that reads framework data from the manifest would under-report coverage, so the manifest doesn't get described as 89% mapped until the matching ladder is ported into the build.

Other things the source gets wrong, recorded rather than smoothed over

15 rows record a literal dash instead of a control, all Edge items, mostly browser-UX settings with no clean framework analogue. Those show as "(none recorded)", which means nothing was written down rather than no control applies. The distinction matters at audit.

And one policy is Level 2 in the workbook and Level 1 in its filename. One of the two is wrong, I haven't resolved which, and the mapping reports the workbook's value and flags the disagreement.

07

How it rolls out

Three tiers, and each platform moves through them on its own timeline. Nothing is ever assigned to All Devices.

01
Pilot
02
Static
03
Dynamic

Every policy starts assigned to the pilot ring for its own platform, and nothing else. Windows workstations, Windows Server, macOS and Linux each have their own ring, so each runs its own soak clock and a problem on one doesn't hold up the others.

TierWho's in itHow it grows
PilotA small, hand-picked set of devices per platformBy hand. The point is that you know every device in it by name
StaticA wider group per platform, still manual membershipA department at a time, after an agreed soak. Usually three to four weeks with no policy-related issues before the next wave
DynamicEvery device of that platform, by membership ruleAutomatically. This is production

Moving a platform to the next tier is one re-run of the deploy with a different stage. The script re-points every policy for that platform in a single pass, and verification then confirms each one names the new tier's group and still excludes break-glass. That's deliberate, because moving 188 Windows policies to a wider group by hand is 188 chances to end up with 185 in the new wave and three left behind.

Why the dynamic tier is a new group, not the static one converted

In the Entra provider, switching a group to dynamic membership is a change Terraform can only make by destroying the group and creating a new one. Intune assignments point at a group's ID, not its name, so converting in place would silently orphan every policy assigned to it. Promotion instead creates a separate dynamic group alongside the static one, which is purely additive. The static group stays, with its membership intact, as a record of who was in each wave and something to fall back to.

Waves go out by department, because tooling profile follows department rather than operating system. The CAD team is a distinct set of applications, peripherals and licence dongles. The dev team is another. Finance is another again. Rolling out alphabetically or by OS alone mixes those profiles together, and when something breaks you've lost the signal about whose tooling caused it.

Windows Server never goes dynamic. Arc-enrolled servers don't populate device attributes reliably enough to trust a membership rule with them, so servers stay on a managed list permanently. The deploy script warns rather than fails if you ask for it.

The pilot used to be one mixed ring. That was safe, since Intune only applies a policy to a matching platform, but it meant one soak clock for everything, and reporting showed 202 Windows policies "assigned" to Macs. Splitting it per platform removed a special case from the code. And a small trap for anyone building the macOS dynamic group: the membership rule is deviceOSType -eq "MacMDM", not "macOS".

macOS has its own ordering problem. The ten profiles carry a deploy order (system extension, network filter, full disk access, background services, notifications, accessibility, Bluetooth, auto-update, Defender, firewall), because the system extension and network filter approvals have to land before Defender tries to load, or users get prompts they can't action. The onboarding file comes fresh from each customer's Defender portal and can't be pre-built or reused.

Break-glass devices are excluded from every policy at every tier, and there's one break-glass group rather than one per platform. It's used mid-incident by whoever is on call, and the property that matters under pressure is that a device in it is excluded from everything, full stop. Four groups would create the failure where someone adds an emergency device to the Windows group while the policy actually biting is a server one.

The riskiest Attack Surface Reduction rules ship in audit mode, which logs what they would have blocked without blocking it. Controlled Folder Access is the main one, and it's the rule most likely to catch CAD autosave and backup agents. Audit mode turns "will this break something" from a guess into evidence from the actual environment. It has its own cost, because it raises Defender notifications that users report as virus warnings, so the service desk gets briefed before it lands.

Names lie, too. Several policies say "BLOCK" in the filename while the recommendation is audit first, so the audit flag follows the production note rather than the filename. The audit-mode switch is deliberately narrow, an explicit list of known encodings rather than a generic mode flipper, and it works both ways, so a reviewed pilot gets promoted to block with the same switch. Only one ASR rule ships in block mode for user-impact purposes: unsigned processes from USB.

08

What the live runs taught me

The first deploy into a real tenant found things no amount of reading the documentation would have. The most useful one is a bug that didn't produce an error at all.

PS> .\Test-EndpointState.ps1 Reading live tenant via Microsoft Graph... Comparing against release manifest 212 checked, 0 missing, 0 created-but-unassigned, 0 missing the break-glass exclusion.

That line took one long day of runs to earn. Five things are worth telling:

What happened
What it changed
A silent failure, caught by the pilot ring
The step that writes the customer's tenant ID and approved extensions into four policies never matched, because of an ID format mismatch. No error, no warning. The policies deployed with the source pack's placeholders.
Nothing outside the pilot ring was exposed, which is the whole argument for pilot rings made concrete. The offline replay now asserts that the real tenant ID and extension IDs reach the outgoing request, not just that the run finished.
Graph won't update a settings catalogue policy's settings
The first re-run was also the first time the update path ever ran, and Graph rejected it outright. Settings are a navigation property and can't be patched.
An update is now create the new copy, assign it, then delete the old one, in that order, so a failed create never leaves the tenant without the policy.
One hand-built rule used the wrong value encoding
A constructed webshell ASR rule for Exchange servers used a numeric value where Graph expected a word. The error listed the valid options.
Fixed in the source and rebuilt, never patched in the output. And a scan of every value in the pack found the audit-mode switch had been targeting an encoding that didn't exist in it.
Endpoint Security intents take the same data under two names
Creating one takes settingsDelta. Updating one takes settings. It's easy to conflate, and I did.
The replay now asserts the exact body parameter for every Graph action the toolkit calls, so none of them can drift back.
A description four characters too long
Graph caps descriptions at 1,000 characters and rejects the whole request rather than trimming.
The source was reworded to fit with its rationale intact, and the build now enforces the limit and warns loudly, so it's caught at build time instead of in a tenant.
The lesson I'd carry to the next one

A deploy script that finds objects by name and creates or updates them has two code paths for every object type, and the update path doesn't run until the second time you deploy to a tenant. A first clean run proves half the code. Most of the bugs above had the same shape: a branch that had never executed, failing the first time it did. The first live engagement hit seven separate deploy failures, each discovered one run at a time, hours apart, and every one was findable offline. So the whole pack now replays offline against a mocked Graph in both create and update mode, across all three rollout tiers, before anything touches a tenant. It asserts on every request the script would send: each assignment carrying its tier group and the break-glass exclusion, customer values actually reaching the wire, no leftover placeholders, no over-length descriptions, and the documented endpoints and body parameter names being the ones used.

Verification can be trusted for a specific reason. It diffs the tenant against a manifest generated independently by the build from the source pack, not from anything the deploy script produces, so a bug in the deploy shows up as MISSING rather than being invisible to its own check.

What verification still can't tell you is whether a value is right for the customer. It confirms every policy exists, is assigned and excludes break-glass. It can't know a tenant ID is the correct one, because the manifest is generic by design. Those four policies get checked by eye in the portal before anything leaves Pilot.

Values that differ per customer

These deploy "successfully" with placeholder values and quietly do the wrong thing. That's worse than failing, which is why the required ones are a hard stop.

PolicyValueIf left as placeholderCheck
OneDrive tenant restrictionTenant IDOneDrive blocked except for the tenant in the source fileRequired, throws
Teams tenant restrictionTenant IDTeams sign-in blocked tenant-wideRequired, throws
Edge extension management (L2)Approved extension IDsEverything blocked, zero approved. Every extension diesRequired, throws
Chrome extension allow listApproved extension IDsSame, for ChromeRequired, throws
macOS Defender onboardingOnboarding fileThrows mid-run at the macOS categoryRequired only if macOS is in scope
Chrome site isolationIsolated originsA literal placeholder. Protects nothingOptional, warns
Quick Machine RecoveryWi-Fi name and passwordA recovery network that doesn't existOptional, warns
10The full run log, 8 September 2026, in order
What brokeFound byFix
Webshell ASR rule used a numeric value; Graph wants a wordLive 400Source JSON fixed, rebuilt, second substitution added
PATCH of settings on a catalogue policyLive 400, first update runRecreate: create, assign, delete old
Customer values never patched (underscore vs hyphen IDs)Reading the code. No error everKeys corrected. Pilot was the only exposure
Quick Machine Recovery password sent as a string; schema wants a secretLive 400Source fixed, made an optional customer value
Description 1,004 characters, limit 1,000Live 400Reworded to 962. Build now enforces and warns
Intents created via an undocumented endpointOffline auditcreateInstance with settingsDelta
Audit-mode encoding didn't exist; switching it off was a no-op; verification signed in itself; a Chrome placeholder went unflaggedOffline replayReal encodings, works both ways, shared session, placeholder scan
Clean pilot run: 212 checked, 0 missing, 0 unassigned, 0 missing the exclusion. All 5 shapes and the include and exclude body confirmed
Single mixed pilot ringDesign reviewSplit into 4 per-platform rings. Break-glass kept as one
updateSettings sent settingsDelta; it wants settingsLive 400, first intent updateFixed. Replay now asserts every action's body parameter

On a virtual machine

The 188 Windows workstation policies were then applied to virtual machines and checked in Intune's per-policy device status report.

ResultPoliciesWhich
Succeeded182Everything else
Conflict2FIDO security keys at Windows sign-in, and the Account Protection intent
Error1Quick Machine Recovery
Not applicable3Credential Guard, the Windows AI Settings Agent, Personal Data Encryption

The FIDO one is the result a VM can't settle. It needs testing on a real device with a real security key, and in an environment where it suits the business use case, before anyone decides how it should be configured.

Still open

09

The question that decides what this is worth

Most of this baseline assumes users are standard users rather than local administrators. Against a local admin, several of these controls are advisory rather than enforced.

That has to be asked up front, because it changes what the baseline actually delivers rather than how it's configured. If the CAD engineers and developers hold local admin because their tooling historically needed it, a large part of the hardening is a recommendation rather than a control, and anyone reading the coverage report would be misled about their own position.

The baseline doesn't manage local admin rights and doesn't enforce standard user. That's deliberate scope, and it's also the single biggest dependency the whole thing has.

10

What this doesn't do

It isn't in production. It's been deployed to and verified in a test tenant, and tested on virtual machines. It has no operational history in a business, and a pilot soak is where the semantic questions get answered.

It isn't certification. It maps to NIST and ISO. It certifies against neither, and a baseline that claims otherwise is selling something.

It isn't the compliance policies. Configuration policies harden the device. Compliance policies are what Conditional Access reads when deciding whether a device is trusted, and that's separate work. The one compliance policy in the pack is a Linux encryption check that reports, and doesn't enforce, and it's described that way.

It doesn't manage local administrator rights, which as above is the dependency that determines how much of it is enforced.

It isn't mobile. Desktop, server and Mac endpoints. iOS and Android app protection is a separate workstream and it isn't in here.

And the controls aren't mine. The largest source is CIS, at 137 of the mapped policies, with the rest coming from Microsoft's Endpoint Security baselines, the cross-platform Defender configuration repo, Microsoft's Modern Workplace guidance, Windows Hello for Business and FIDO material, and in one case Apple's own device management repository. The selection, the operational analysis, the framework mapping, the decision process and the tooling are the work.