Stopping Silent Profile Failures with Declarative Management
Declarative device management status subscriptions let macOS fleets auto-detect and remediate silent profile failures before users open a ticket.

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.
A user reports that their VPN stopped connecting the morning after a macOS update. The technician opens System Settings, checks the Profiles pane, sees the payload is still listed, deletes it anyway, waits for the next MDM check-in, and hopes the reinstall sticks.
Multiply that by every device that picked up the same OS build, and you have a queue of nearly identical tickets with no shared underlying cause visible to anyone until someone finally reads a sysdiagnose. That is the old way: profile failures are invisible until a human notices something broken, and diagnosis starts from zero every single time.
The new way uses the status reporting built into Declarative Device Management (DDM) to catch a failing configuration the moment it happens, not at the next scheduled check-in. Instead of technicians polling for symptoms, the Mac itself pushes a status report when a subscribed item changes state. Pair that push with an API-driven redeploy and a read-only diagnostic script on the affected Macs, and most failures are corrected before the user notices the payload dropped.
#Why Configuration Profile Failures Go Quiet
Classic MDM check-ins are reactive. The device receives an APNs push telling it commands are waiting, contacts the server, and reports command status as a flat Acknowledged, Error, or NotNow. There is no ongoing feedback loop describing whether a Wi-Fi payload is still valid, whether a certificate reference resolved, or whether a VPN configuration silently detached after a profile edit. If nobody is watching the Profiles pane on that specific Mac, the failure sits there until the user complains.
Declarative Device Management, introduced with macOS 13 Ventura and expanded through Sonoma and Sequoia, changes the model. The device evaluates declarations locally and autonomously enforces them, then proactively sends a Status Report whenever a subscribed StatusItem changes, rather than waiting to be asked.
That means a broken certificate reference, a duplicate identifier collision, or a Wi-Fi payload that failed validation gets reported proactively when the status changes, not at the next scheduled poll.
The most common silent-failure causes worth automating around are: certificate rotation breaking a PayloadCertificateUUID reference, Smart Group flapping causing repeated profile removal and reinstallation, a profile edited without a version bump so the device thinks nothing changed, and scope conflicts where a locally installed profile shares an identifier with a server-pushed one.
#Prerequisites and Permissions
- Target devices running macOS 13 or later, ideally macOS 14+ for full StatusItem coverage.
- Devices enrolled through Automated Device Enrollment via Apple Business Manager or Apple School Manager for full supervised DDM behaviour. Some declarations are limited to supervised Macs, so check each declaration’s allowed enrolment types.
- An MDM server with documented DDM support: Jamf Pro enables declarative management automatically on compatible devices and shows whether it is enabled in a computer’s General inventory; check your Jamf Pro version’s release notes for exactly which DDM status data it exposes, and for Microsoft Intune check which declarative settings it supports for macOS before planning around them.
- A Jamf Pro API role scoped to Send Declarative Management Command and Read Computers, plus Read and Update Smart Computer Groups and Create Webhooks for setup. Do not use a full administrator token for this automation.
- An API client secret stored in a secrets manager, never committed to a script file or repository.
- A pilot Smart Group capped at 25 devices for the first rollout. Blast radius for this automation is limited to reinstalling or reissuing configuration declarations; it must never touch FileVault, firmware password, or account payloads.
- A monitoring signal already wired up: Smart Group membership count for a group named something like DDM Configuration Failed, and webhook delivery success rate from your MDM platform.
#Implementation Steps
Confirm DDM capability on target devices.
Action: run a local capability check before subscribing to status./usr/bin/profiles status -type enrollmentExpected result: the output shows
Enrolled via DEP: Yesand a line beginningMDM enrollment: Yes. This confirms enrolment only; confirm declarative capability from the server side, where the device’smanagement.client-capabilitiesstatus item is reported to your MDM. Evidence: capture the raw command output as a text log named after the device serial number, stored with the pilot rollout ticket.Publish a Status Subscriptions declaration to the pilot group.
Action: have your MDM publish a status-subscriptions declaration (delivered to the device through the DeclarativeManagement command) so the device knows which items to report on.1{ 2 "Identifier": "0BB7E38A-4C1B-4B3E-9C2A-5A7D1E0F3B21", 3 "Type": "com.apple.configuration.management.status-subscriptions", 4 "ServerToken": "1", 5 "Payload": { 6 "StatusItems": [ 7 { "Name": "device.identifier.serial-number" }, 8 { "Name": "management.declarations" }, 9 { "Name": "management.client-capabilities" }, 10 { "Name": "security.certificate.list" } 11 ] 12 } 13}Every declaration needs a unique Identifier and a ServerToken that changes whenever the declaration changes. The
security.certificate.liststatus item is documented for macOS 14 and later only. Status covers only configurations delivered as declarations (a profile can be wrapped in acom.apple.configuration.legacydeclaration);management.items are reported without a subscription. Expected result: the device acknowledges the declaration and it appears under Active Declarations for that host in your MDM console. Evidence: the declaration acknowledgement timestamp in the MDM server log.
Surface DDM status inside Jamf Pro inventory.
Action: no inventory setting is needed, because Jamf Pro enables declarative management automatically on compatible devices; build a Smart Group.Smart Group criteria: Declarative Device Management Status is Failed OR Configuration Profile Status is Error.
Jamf does not document these criteria for every version, so first check that your version offers a criterion for failed declarations; if it does not, use an alternative signal such as an extension attribute that reports the failure, and confirm the group populates during the Verification test before building anything on it.
Expected result: the Smart Group populates automatically the next time a subscribed device reports an invalid state. Evidence: a screenshot-free log export of the Smart Group membership list showing at least one device during your simulated failure test (see Verification).
Build the remediation script.
Action: write a read-only diagnostic script that checks enrolment and records the result before exiting.Apple does not document a local command that forces a declarative sync, and
profiles renew -type enrollmentre-requests the Automated Device Enrollment profile and can show the user an enrolment prompt, so it has no place in an unattended script; the server-side redeploy in the next step reissues the declarations.Scope the script only to devices already in the failed Smart Group.
1#!/bin/bash 2set -euo pipefail 3 4LOG="/var/log/ddm-selfheal.log" 5echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) starting diagnostic check" >> "$LOG" 6 7STATUS=$(/usr/bin/profiles status -type enrollment) 8echo "$STATUS" >> "$LOG" 9 10if echo "$STATUS" | grep -q "MDM enrollment: Yes"; then 11 echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) enrolment healthy" >> "$LOG" 12 rm -f /var/db/ddm_attempts.count 13 exit 0 14else 15 echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) enrolment check failed" >> "$LOG" 16 echo $(( $(cat /var/db/ddm_attempts.count 2>/dev/null || echo 0) + 1 )) > /var/db/ddm_attempts.count 17 exit 1 18fiExpected result: exit code 0 when enrolment is healthy, exit code 1 when it is not, both written to the local log; the script changes nothing on the device. Evidence: policy run history in Jamf Pro showing the script’s captured stdout and exit status, or the equivalent Intune shell script run report.
Wire the Smart Group to an automated redeploy via webhook.
Action: configure a Jamf Pro webhook for the SmartGroupComputerMembershipChange event, pointed at a small receiver that asks Jamf Pro to force a declarative sync for each added computer. The receiver starts in dry-run mode, has a kill switch, skips any computer it synced in the last six hours (which stops Smart Group flapping turning into a loop), and logs rather than silently drops anything over the per-call cap.1import os, time 2from flask import Flask, request 3import requests 4 5app = Flask(__name__) 6JAMF_URL = "https://yourinstance.jamfcloud.com" 7TOKEN = os.environ["JAMF_TOKEN"] # scoped token from the secrets manager 8DRY_RUN = os.environ.get("DDM_DRY_RUN", "true") == "true" 9ENABLED = os.environ.get("DDM_AUTOMATION_ENABLED", "false") == "true" 10HEADERS = {"Authorization": "Bearer " + TOKEN, "Accept": "application/json"} 11last_sync = {} # computer ID -> epoch seconds of the last sync request 12 13def get_management_id(computer_id): 14 r = requests.get( 15 f"{JAMF_URL}/api/v4/computers-inventory/{computer_id}?section=GENERAL", 16 headers=HEADERS, timeout=15) 17 r.raise_for_status() 18 return r.json()["general"]["managementId"] 19 20@app.route("/ddm-webhook", methods=["POST"]) 21def handle_membership_change(): 22 payload = request.get_json() 23 event = payload.get("event", {}) 24 # Jamf's example payload carries the group name in event.name and the added 25 # computers' Jamf Pro IDs in event.groupAddedDevicesIds; confirm against the 26 # Jamf Pro webhooks guide for your version. 27 if event.get("name") != "DDM Configuration Failed": 28 return "", 204 29 if not ENABLED: 30 return "", 204 # kill switch 31 added = event.get("groupAddedDevicesIds", []) 32 now = time.time() 33 due = [i for i in added if now - last_sync.get(i, 0) > 6 * 3600] 34 if len(due) > 25: 35 app.logger.warning("cap reached, deferring %s", due[25:]) 36 results = {} 37 for i in due[:25]: 38 mid = get_management_id(i) # management ID, not the Jamf Pro ID 39 if DRY_RUN: 40 app.logger.info("dry run: would sync %s (%s)", i, mid) 41 continue 42 r = requests.post(f"{JAMF_URL}/api/v1/ddm/{mid}/sync", 43 headers=HEADERS, timeout=15) 44 last_sync[i] = now 45 results[i] = r.status_code 46 time.sleep(1) # simple rate limit 47 return {"results": results}, 200Note: the Jamf Pro API documents
/api/v1/ddm/{clientManagementId}/syncto force a declarative sync; confirm the path, the response codes and the API privilege it needs in the API reference for your version before production use, and setDDM_DRY_RUN=falseonly after the pilot logs look right.Expected result: the flagged computer drops out of the failed Smart Group at its next re-evaluation; how long that takes depends on your inventory and Smart Group settings. Evidence: webhook receiver log entry paired with the Smart Group’s next membership snapshot showing the device removed.
Add an offline-first fallback with a LaunchDaemon.
Action: on devices in the failed Smart Group only, deploy a LaunchDaemon so the read-only diagnostic script also runs on a fixed interval regardless of server reachability, covering devices that are intermittently off the corporate network. Remove it with the rollback commands below once the device leaves the group.1cat << 'EOF' > /Library/LaunchDaemons/com.company.ddmselfheal.plist 2<?xml version="1.0" encoding="UTF-8"?> 3<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 4<plist version="1.0"> 5<dict> 6 <key>Label</key> 7 <string>com.company.ddmselfheal</string> 8 <key>ProgramArguments</key> 9 <array> 10 <string>/usr/local/bin/ddm-selfheal.sh</string> 11 </array> 12 <key>StartInterval</key> 13 <integer>14400</integer> 14 <key>RunAtLoad</key> 15 <true/> 16</dict> 17</plist> 18EOF 19chown 0:0 /Library/LaunchDaemons/com.company.ddmselfheal.plist 20chmod 644 /Library/LaunchDaemons/com.company.ddmselfheal.plist 21launchctl bootstrap system /Library/LaunchDaemons/com.company.ddmselfheal.plistExpected result: the daemon fires every four hours (14400 seconds) and on load, writing to the local log even when the device cannot currently reach the MDM server. Evidence: /var/log/ddm-selfheal.log showing periodic entries independent of server contact.

Configure escalation alerting.
Action: add an extension attribute that only reports the attempt counter, build a Smart Group for a value of 3 or more, and send one alert when a computer joins that group (from the same SmartGroupComputerMembershipChange webhook receiver).1#!/bin/bash 2ATTEMPTS_FILE="/var/db/ddm_attempts.count" 3COUNT=$(cat "$ATTEMPTS_FILE" 2>/dev/null || echo 0) 4echo "<result>$COUNT</result>"Expected result: one alert per device lands in the on-call channel after the inventory update that reports the third consecutive failure; timing depends on your inventory update frequency. Evidence: the Slack or Teams message timestamp and the corresponding attempt count logged locally.
Following along? Tap a step’s number to tick it off.
#Verification and Expected Evidence
Before trusting this automation on the full fleet, force a controlled failure on a pilot device: intentionally break a certificate reference by removing or invalidating the test certificate asset referenced by a Wi-Fi or VPN declaration, then confirm the following chain of evidence in order:
1{
2 "StatusItems": {
3 "management": {
4 "declarations": {
5 "configurations": [
6 {
7 "identifier": "com.company.vpn.zero-trust",
8 "active": false,
9 "valid": "invalid",
10 "server-token": "def456",
11 "reasons": [
12 { "code": "InvalidPayload", "description": "Certificate reference not found" }
13 ]
14 }
15 ]
16 }
17 }
18 }
19}- A status report like the illustrative one above (reason codes vary) arrives at the MDM server shortly after the break, showing valid: invalid and a reason code.
- The device appears in the DDM Configuration Failed Smart Group within one inventory update cycle. If it does not, the Smart Group criterion from step 3 is not catching failed declarations in your Jamf Pro version, and the webhook chain will not fire; fix the signal before going further.
- The webhook receiver log shows a dry-run line for the device, then, with dry run off, a successful response from the sync endpoint.
- The local self-heal log on the device shows a diagnostic check and either a healthy result or a recorded failure with an incrementing attempt counter.
- The Smart Group membership refreshes and the device is removed once the certificate reference is restored, or an escalation alert fires if it is not.
Keep the JSON status report, the Smart Group export, and the webhook log together as your evidence bundle for the pilot sign-off.
#Rollback
If the automation misbehaves, for example redeploying commands in a loop or flooding the webhook receiver, roll back in this order:
- Disable the Jamf Pro webhook subscription for SmartGroupComputerMembershipChange immediately to stop further automated calls.
- Remove the status-subscriptions declaration from the pilot group’s declaration set in your MDM, so that after the next declarative sync devices stop reporting the subscribed items;
management.status items are always reported, so the disabled webhook is what stops the loop. - Unload and remove the LaunchDaemon:
1launchctl bootout system /Library/LaunchDaemons/com.company.ddmselfheal.plist 2rm /Library/LaunchDaemons/com.company.ddmselfheal.plist - Restore the previous configuration profile version from your MDM’s version history if a bad edit caused the original failure.
- Document the rollback reason and the device count affected before re-attempting the pilot.
#Failure and Escalation Conditions
- Wake a human immediately if the fleet-wide failure rate for any single declaration identifier exceeds 5 percent of the enrolled population within one hour, this indicates a systemic certificate, network, or profile authoring problem rather than a device-level issue.
- Escalate to L2 if a single device fails three consecutive diagnostic checks after a server-side sync, since repeated failures usually mean a hardware, keychain, or Secure Enclave issue that scripting cannot fix.
- Escalate to L3 if APNs push delivery errors persist for more than 15 minutes across multiple devices, since this points at a certificate expiry or push connectivity problem upstream of any single Mac.
- Treat any Status Report showing a server-token mismatch that persists after a clean redeploy as a signal to manually inspect the profile’s raw XML for malformed payload references before re-pushing again.
#Measuring Ticket Deflection
Baseline your current ticket volume for categories tagged with terms like profile missing, VPN not connecting, or Wi-Fi keeps dropping over a rolling 90-day window before deployment. After the automation is live for one full patch cycle, compare the same categories against the same device population size.
A useful deflection formula is: deflection rate equals (baseline tickets minus post-deployment tickets) divided by baseline tickets, expressed as a percentage.
Track it alongside two supporting metrics: mean time from failure detection to remediation, which should fall from hours or days down to single-digit minutes, and the ratio of auto-resolved failures to escalated ones, which tells you whether the threshold in the escalation step needs tuning.
Review both numbers monthly during the first quarter after rollout, then quarterly once the baseline stabilises.
#References
For the underlying protocol behaviour, see Apple’s own documentation on the Device Management framework reference, which describes the MDM and declarative command structures used throughout this automation. For deployment-level guidance on enabling and scoping declarative management for organisation-owned devices, consult Apple’s Apple Platform Deployment guide.
For API scoping, roles, and current command catalogues, check the Jamf Pro API developer documentation before finalising the webhook receiver’s command type. For organisations running a mixed fleet, Microsoft’s guidance on monitoring device configuration profiles in Intune covers the equivalent compliance signal handling on that platform.
#Related reading
Evidence trail
Sources and verification
Primary documentation and external technical references used in this article.
About this page
Credited to
Dates
Published
Found this useful? Follow KBY for more like it.
Recommended reading
More from KBY that goes with this article.


Education ITClassroom management software for schools: check what your devices already include
8 min read
Related articles
Device Management
Ending VPN Split-Tunnel Break Fixes With Auto-Profile Repair
A proactive remediation pipeline detects VPN split-tunnel route drift and rebuilds profiles automatically before users ever log a ticket.
ReadDevice Management
Auto-Remediating macOS Time Machine Backup Silent Failures
Stop silent Time Machine failures on managed Macs with a Jamf Pro and Intune remediation pipeline that detects, fixes, and escalates automatically.
ReadEnterprise IT Management
Part 6: Reset, Retire and Reuse Windows Autopilot Devices Safely in Intune
Autopilot Reset, Wipe and Fresh Start compared, a handover to a new user, and the safe order for retiring a device.
ReadEnterprise IT Management
Part 5: Run Your First Windows Autopilot Deployment and Fix ESP Device Setup Timeouts
Run the first user-driven Autopilot deployment, read each ESP phase, collect logs with mdmdiagnosticstool and fix device setup time-outs.
ReadWas this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Operate smarter, with fewer recurring tickets.
Receive new operational playbooks, incident-prevention guidance, automation scripts and recovery runbooks.
Comments
Add a thoughtful note on Stopping Silent Profile Failures with Declarative Management. Comments are checked for spam and held for moderation before appearing.