Skip to main content

How to suppress the macOS 27 notification when deploying with Jamf

Use Jamf Pro to suppress the one-time macOS 27 notification while the Mac Agent configuration profiles are applied.

Introduction

On macOS 27 and newer, when the Mac Agent configuration profiles are applied, macOS shows the user a one-time notification:

The notification is informational only and requires no action. It can’t be turned off through standard MDM settings, but if you deploy with Jamf Pro, you can hide it while the profiles are applied. All notifications are suppressed while the suppression setup is active. This article explains how to set this up.

Note: This setup builds on the standard Jamf deployment. Set up the profiles and the Agent package first, as described in How to install the Mac Agent remotely using Jamf.

How It Works

  • Suppression Service: Jamf installs and starts a background service (LaunchDaemon) that keeps closing the macOS Notification Center process while it runs.

  • Readiness Flag: The service creates a flag file on the Mac to confirm that suppression is active.

  • Extension Attribute: A Jamf Extension Attribute reads this flag and reports the Mac’s status to the Jamf inventory.

  • Smart Group: A Jamf Smart Group automatically includes the Macs where suppression is confirmed active or already completed.

  • Profile Scope: The configuration profiles are scoped only to this Smart Group, so they can’t reach a Mac before the suppression service has started.

  • Stop Policy: When an admin adds a Mac to the Suppression Stop static group and the allinone profile is installed, a separate policy stops the service and removes it. Notifications then return to normal.

Note: Suppression continues to run until it is stopped, either with the Stop policy or manually.

Limitations

  • All Notifications Are Held Back: While suppression is active, the user doesn’t see any system notifications, including from apps like Calendar, Mail, Messages, etc. The notifications aren’t lost. They’re queued and shown once suppression stops. Suppression continues after the Mac restarts, and users can’t stop it without admin rights, because it runs under the MDM account.

  • Permissions Are Not Bypassed: The setup doesn’t disable or bypass macOS privacy protection (TCC). It only controls when the notification is shown; the permissions are still granted through the configuration profiles as usual.

  • Notification Shown When Suppression Stops: If an admin stops the suppression manually before the profiles are installed, the one-time notification is shown.

1. Add the Scripts

In Jamf Pro, go to Settings > Computer Management > Scripts and click + New to add each of these scripts.

Note: The scripts use com.yourcompany and /usr/local/yourcompany as placeholders. You can replace them with your own identifier, as long as you use the same values in all scripts and commands.

Script 1: Notification Suppression - Start

This script creates and starts the suppression service and the readiness flag file.

#!/bin/bash

# --- Settings ---
LABEL="com.yourcompany.notifsuppress"
SCRIPT="/usr/local/yourcompany/notifsuppress.sh"
PLIST="/Library/LaunchDaemons/${LABEL}.plist"
READY_FLAG="/var/db/.notifsuppress_ready"
STOP_FLAG="/var/db/.notifsuppress.stop"

mkdir -p /usr/local/yourcompany
rm -f "$READY_FLAG" "$STOP_FLAG"

# --- Suppression script ---
cat > "$SCRIPT" <<'EOF'
#!/bin/bash
READY_FLAG="/var/db/.notifsuppress_ready"
STOP_FLAG="/var/db/.notifsuppress.stop"

touch "$READY_FLAG"

while [ ! -f "$STOP_FLAG" ]; do
    pkill -x NotificationCenter 2>/dev/null
    sleep 0.3
done

rm -f "$READY_FLAG"
EOF

chown root:wheel "$SCRIPT"
chmod 755 "$SCRIPT"

# --- LaunchDaemon ---
cat > "$PLIST" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>${LABEL}</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/bash</string>
        <string>${SCRIPT}</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/var/log/notifsuppress.log</string>
    <key>StandardErrorPath</key>
    <string>/var/log/notifsuppress.log</string>
</dict>
</plist>
EOF

chown root:wheel "$PLIST"
chmod 644 "$PLIST"

# --- Start the service ---
launchctl bootout system "$PLIST" 2>/dev/null
launchctl bootstrap system "$PLIST"

# --- Wait for the readiness flag (up to 15 seconds) ---
for i in {1..15}; do
    [ -f "$READY_FLAG" ] && break
    sleep 1
done

[ -f "$READY_FLAG" ] || { echo "suppression did not start"; exit 1; }

echo "suppression is active, safe to add device to profile scope"

/usr/local/bin/jamf recon

Script 2: Notification Suppression - Stop

This script stops the suppression service once an admin adds the Mac to the Suppression Stop static group, removes the service and its files, and updates the Jamf inventory.

#!/bin/bash

# --- Settings ---
READY_FLAG="/var/db/.notifsuppress_ready"
STOP_FLAG="/var/db/.notifsuppress.stop"
DONE_FLAG="/var/db/.notifsuppress_done"

# --- Signal the service to stop ---
touch "$STOP_FLAG"

# --- Wait for the service to exit (up to 15 seconds) ---
for i in {1..15}; do
    [ -f "$READY_FLAG" ] || break
    sleep 1
done

# --- Remove the service and its files ---
launchctl bootout system /Library/LaunchDaemons/com.yourcompany.notifsuppress.plist 2>/dev/null
rm -f /Library/LaunchDaemons/com.yourcompany.notifsuppress.plist
rm -f /usr/local/yourcompany/notifsuppress.sh
rm -f "$READY_FLAG"

# --- Mark the Mac as done, so the profiles stay installed ---
touch "$DONE_FLAG"

/usr/local/bin/jamf recon

2. Create the Extension Attribute

Go to Settings > Computer Management > Extension Attributes and click + New. Use these settings:

  • Display Name: Notification Suppression Ready

  • Data Type: String

  • Input Type: Script

Add this script:

#!/bin/bash

# Order matters: "Done" is checked first, so a Mac stays "Done"
# even if a stale ready flag is left behind.
if [ -f "/var/db/.notifsuppress_done" ]; then
    echo "<result>Done</result>"
elif [ -f "/var/db/.notifsuppress_ready" ]; then
    echo "<result>Ready</result>"
else
    echo "<result>NotReady</result>"
fi

Once a Mac has been handled, this attribute changes to Done and stays Done, and the Mac remains in the OS 27+ and Suppression Ready group, so the profiles aren't removed.

3. Create the Groups

3.1 Create the Static Groups

Go to Computers > Static Groups and click + New. Create a static group (e.g., Teramind Macs) and add all the Macs you want to deploy the profiles to.

Go to Computers > Static Groups and click + New. Create a second static group named Suppression Stop. You add Macs to this group when you’re ready to stop the suppression on them.

3.2 Create the Smart Groups

Go to Computers > Smart Groups and click + New to create each of these groups:

  • OS Below 27: Macs in this group get the profiles directly, without suppression, since the notification doesn’t appear on older macOS versions. Criteria: Operating System Version is less than 27 AND Member of the static group Teramind Macs.

  • OS 27+: This is the scope for the Start policy only. Never use it as a profile’s scope, because the profiles would arrive before suppression starts. Criteria: Operating System Version is 27 or higher AND Notification Suppression Ready is not Done AND Member of the static group Teramind Macs.

  • OS 27+ and Suppression Ready: This is the group that gets the profiles on macOS 27 and newer. Criteria: Operating System Version is 27 or higher AND Member of the static group Teramind Macs AND (Notification Suppression Ready is Ready OR Notification Suppression Ready is Done).

  • OS 27+ and Suppression Ready to Stop: This is the scope for the Stop policy only. It includes the Macs where suppression is active, the allinone profile is installed and an admin has added the Mac to the Suppression Stop static group. Criteria: Operating System Version is 27 or higher AND Member of the static group Teramind Macs AND Notification Suppression Ready is Ready AND Profile Name has the name of the allinone profile in Jamf AND Member of the Suppression Stop static group.

4. Create the Start Policy

Go to Computers > Policies and click + New. Configure the policy:

  • General: Set the Display Name to Notification Suppression - Start. Under Trigger, select Enrollment Complete and Recurring Check-in. Set Execution Frequency to Once per computer.

  • Scripts: Add the Notification Suppression - Start script.

  • Scope: Add the OS 27+ Smart Group.

5. Create the Stop Policy

Create another policy to stop the suppression:

  • General: Set the Display Name to Notification Suppression - Stop. Under Trigger, select Enrollment Complete and Recurring Check-in. Set Execution Frequency to Once per computer.

  • Scripts: Add the Notification Suppression - Stop script.

  • Scope: Add the OS 27+ and Suppression Ready to Stop Smart Group.

6. Scope the Profiles and the Agent Package

Open the allinone profile and, under Scope > Targets, add both of these Smart Groups:

  • OS Below 27: The profile reaches these Macs right away.

  • OS 27+ and Suppression Ready: The profile reaches these Macs only once suppression is confirmed.

The VPN profile doesn’t trigger the notification, so scope it as usual.

Assign the Agent installation package (policy) to the OS Below 27 Smart Group, so these Macs get the Agent right away, and to the OS 27+ and Suppression Ready Smart Group, so these Macs get it only once suppression is confirmed.

For how to add the profiles and create the package policy, see How to install the Mac Agent remotely using Jamf.

7. Verify that Suppression is Running

To check on a Mac, run:

echo "LaunchDaemon:" && sudo launchctl list | grep notifsuppress
echo "Ready flag:" && ls /var/db/.notifsuppress_ready 2>&1
echo "Process:" && ps aux | grep "[n]otifsuppress.sh"

If all 3 checks return a result (the service is listed, the flag file exists and the process is running), suppression is active.

You can also use these commands:

  • Service Status: sudo launchctl print system/com.yourcompany.notifsuppress

  • Notification Center Is Being Closed: Run ps aux | grep "[N]otificationCenter" several times. The process ID should change.

  • Script Log: cat /var/log/notifsuppress.log

In Jamf Pro, check that the Mac appears in the OS 27+ and Suppression Ready Smart Group, and check the Start policy status in the computer record under History > Policy Logs.

8. Stop Suppression Manually

Suppression normally stops through the Stop policy. To stop it right away on a specific Mac, run these commands on the Mac (locally, or with a Jamf remote command or script). Please execute it only if the allinone profile is already installed:

#!/bin/bash

# --- Signal the service to stop ---
sudo touch /var/db/.notifsuppress.stop
sleep 2

# --- Remove the service and its files ---
sudo launchctl bootout system /Library/LaunchDaemons/com.yourcompany.notifsuppress.plist
sudo rm -f /Library/LaunchDaemons/com.yourcompany.notifsuppress.plist
sudo rm -f /usr/local/yourcompany/notifsuppress.sh
sudo rm -f /var/db/.notifsuppress_ready /var/db/.notifsuppress.stop

# --- Mark the Mac as done, so the profiles stay installed ---
sudo touch /var/db/.notifsuppress_done

# --- Update the Jamf inventory ---
sudo /usr/local/bin/jamf recon

Notifications return to normal right away.

Related Articles