Security agents on macOS are where zero-touch usually stops being zero-touch. Install Defender or the Global Secure Access client by itself and the Mac asks you to allow a system extension, approve a network filter, grant Full Disk Access and allow notifications. Each prompt needs an admin, and most users click the wrong button.
The fix is to send the Mac its permissions before the agent arrives. Then there’s nothing left to ask.
This is Part 4 of Zero-Touch Mac, a series about building a managed Mac from Apple Business and Intune with every policy, profile and app scripted through Microsoft Graph.

The rule: profiles first, agent second
Every prompt macOS shows for a security agent has a configuration profile that answers it in advance:
| What macOS would ask | What answers it |
|---|---|
| Allow a system extension | System extension policy, by team ID and bundle ID |
| Allow a network filter or proxy | Content filter or transparent proxy payload |
| Allow Full Disk Access | Privacy preferences (TCC) payload |
| Allow notifications | Notifications payload |
| Allow it to run in the background | Managed login items payload |
If the profiles land first, the agent installs silently. If the agent lands first, the prompts appear and the profiles only stop them next time. On a new Mac, everything is assigned at once, so I put the profiles on the enrolment group and let the apps follow.
Microsoft Defender for Endpoint
Defender needs two profiles and an app.
System settings. Microsoft publishes a combined mdatp.mobileconfig in its mdatp-xplat GitHub repository. It covers the system extensions, network content filter, Full Disk Access, accessibility for data loss prevention, notifications and background services. My baseline script downloads the current version when it runs and checks it contains the system extension and privacy payloads before uploading it. That way it stays in step with Microsoft rather than with a copy I saved months ago.
Onboarding. This connects the Mac to your tenant in the Defender portal. Download the onboarding package for macOS with Intune as the deployment method, and pass the zip to the script. It finds the Intune onboarding file inside and uploads it as a custom profile.
The app. Intune has Defender for macOS as a built-in app type. It’s Required to the enrolment group.
On my Mac, mdatp health showed it healthy and onboarded within a few minutes of setup, with no prompts.
Global Secure Access
The Global Secure Access client is Microsoft’s agent for Entra Internet Access and Private Access. On a Mac it runs as a system extension and a transparent proxy, so it needs the same treatment.
My Set-AKCMacGSA.ps1 script creates three profiles:
| Profile | What it does |
|---|---|
| GSA System Extensions | Allows com.microsoft.globalsecureaccess and com.microsoft.globalsecureaccess.tunnel, team UBF8T346G9 |
| GSA Transparent Proxy | Microsoft’s com.apple.vpn.managed TransparentProxy payload |
| GSA Client Settings | Hides Pause, Disable and Quit in the client’s menu, so it stays on |
Then the client itself. It’s a PKG from the Entra admin centre (Global Secure Access, Connect, Client download), uploaded with my generic app script as a Required app.
One catch when uploading it: the PKG also contains Microsoft AutoUpdate. If you let a tool read the first bundle ID it finds, Intune ends up detecting the client by com.microsoft.autoupdate2, which is on every Mac with Office. The client then shows as installed everywhere, including Macs where it isn’t. My script shows the bundle ID it picked in the dry run, so check it before you apply.
Why Required?
My default is that apps are optional and live in Company Portal. Security agents are the exception. A Mac without Defender isn’t protected, and a Mac without Global Secure Access isn’t following my network policies, so neither should depend on someone choosing to install them.
The Required list on my Macs is short: Company Portal, Defender, Global Secure Access, Edge and Microsoft 365. Everything else is optional.
Checking it worked
mdatp health --field healthy
mdatp health --field licensed
systemextensionsctl list | grep -i -E "wdav|globalsecureaccess"
The first two should say true. The last should show the Defender and Global Secure Access extensions as [activated enabled].
If an extension shows as waiting for user approval, the profile arrived after the agent. Check the profile is assigned to the same group as the app, then remove and reinstall the app.
One false alarm
Later in this series, Parallels wouldn’t start and I suspected Defender. mdatp threat list showed nothing, and Defender wasn’t the cause. If an app misbehaves on a managed Mac, it’s worth checking Defender first, but don’t stop there. Part 6 is what it actually was.
Next in the series: deploying Mac apps through Graph, and why some of them arrived “damaged”.
Comments
No comments yet — be the first to leave one below.