Darshan Hiranandani : Disabling Self Service Notification Banner - Seeking Additional Suggestions

darshanhira
New Contributor II

Hi All,

I’m Darshan Hiranandani, facing an issue where the Self Service notification banner keeps appearing at the top right corner of the screen, even after attempting to disable it through different methods. I’ve tried deploying a script via Policy, but the notification still shows up.

Here’s the script I’ve been using:

#!/bin/bash

# Get the currently logged-in user
currentUser=$(stat -f%Su /dev/console)

# Path to the user's notification preferences
plistPath="/Users/$currentUser/Library/Preferences/com.apple.ncprefs.plist"

# Disable notifications for Self Service
if [ -f "$plistPath" ]; then
sudo -u "$currentUser" defaults write "$plistPath" apps -array-add '{ "bundle-id" = "com.jamfsoftware.selfservice.mac"; "flags" = 0; "show" = 0; }'
else
echo "Notification preferences file not found for user $currentUser"
fi

Unfortunately, this hasn't worked for me. Has anyone else run into this problem and successfully disabled the Self Service notification banner?

If anyone has additional suggestions or a different approach, I'd greatly appreciate your input.

Thanks in advance!

Regards

Darshan Hiranandani

1 REPLY 1

AJPinto
Esteemed Contributor

Generally speaking you don't want to disable Self Service Notifications, this is how Jamf notifies users of things.

 

However, you would not do this with a script. Scripts run in the user space, so whatever value you are setting is being set for root which is who is running the script. You should be able to use a Notifications Configuration Profile to allow or disallow notifications from Self Service.apps bundleID. Again, I recommend against disabling Self Services notifications.