Custom Menu Bar Action Items with Self Service+
- Last UpdatedOct 6, 2025
- 4 minute read
Self Service+ (formerly the Jamf Connect menu bar app) allows you to create custom action items in the menu bar. These items can open URLs or run any script in the background of the computer, allowing you to create a wide variety of powerful and convenient resources for the user. Custom menu bar action items are added to the menu bar by deploying an additional configuration profile written to the following domain:
com.jamf.connect.actions
You can create menu bar items to do any of the following and more:
Connect the computer to a VPN
Display network information in the menu bar
Open your organization's website in a web browser
Run a script that executes a maintenance policy deployed by your MDM solution
When using the first example, update the com.jamf.connect.actions.plist file with the code provided. The second example can be uploaded directly to a Jamf Pro profile.
<?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>Version</key> <integer>1</integer> <key>MenuIcon</key> <true/> <key>Actions</key> <array> <dict> <key>Name</key> <string>en0</string> <key>Title</key> <dict> <key>Command</key> <string>path</string> <key>CommandOptions</key> <string>/usr/sbin/ipconfig getifaddr en0</string> </dict> <key>Show</key> <array> <dict> <key>Command</key> <string>ping</string> <key>CommandOptions</key> <string>www.apple.com</string> </dict> </array> <key>Action</key> <array> <dict> <key>Command</key> <string>path</string> <key>CommandOptions</key> <string>/bin/hostname</string> </dict> </array> <key>ToolTip</key> <string>Primary IP Address</string> </dict> <dict> <key>Name</key> <string>Hostname</string> <key>Title</key> <dict> <key>Command</key> <string>path</string> <key>CommandOptions</key> <string>/bin/hostname</string> </dict> </dict> <dict> <key>Name</key> <string>non-working ping test</string> <key>ToolTip</key> <string>This is a ping test</string> <key>Title</key> <dict> <key>Command</key> <string>ping</string> <key>CommandOptions</key> <string>dc1.connect.test</string> </dict> <key>Action</key> <array> <dict> <key>Command</key> <string>path</string> <key>CommandOptions</key> <string>/bin/hostname</string> </dict> </array> <key>Post</key> <array> <dict> <key>Command</key> <string>alert</string> <key>CommandOptions</key> <string>This is just a test</string> </dict> </array> </dict> <dict> <key>Name</key> <string>separator</string> </dict> <dict> <key>Action</key> <array> <dict> <key>Command</key> <string>url</string> <key>CommandOptions</key> <string>https://www.jamf.com</string> </dict> </array> <key>Name</key> <string>Open jamf.com in your browser</string> </dict> <dict> <key>Action</key> <array> <dict> <key>Command</key> <string>app</string> <key>CommandOptions</key> <string>/Applications/Calculator.app</string> </dict> </array> <key>Name</key> <string>Open the macOS Calculator</string> </dict> </array> </dict> </plist>
Within the com.jamf.connect.actions
domain, the following preference keys determine the behavior of the menu. The only required part of each item is the name; all other parts are optional. Consider the following when creating menu bar items:
The result of any command can be passed on to the next. Using
<<result>>
as a command option will replace it with the result of the previous command.true
orfalse
results are not passed to the next command.Adding
true
orfalse
at the end of the command will cause that command to run only if the previously run command returns accordingly. For example, usingalertTrue
as the command name will run thealert
command only if the previously run command returnstrue
.
The result state is persistent, allowing multiple commands to be designated to run or not run depending on a single result. For example, if a result of true
is passed to a sequence commands with false
modifiers appended to their command names, none of those commands would be run.
The following table includes the global preferences for a custom menu bar action configuration profile.
Setting | Description | Type |
---|---|---|
| Determines if the action menu will display a status icon (green, yellow, or red) Note:
| Boolean |
| When set to true, Self Service+ will use the result of the command as the text of the menu item. Note:
| Boolean |
Setting | Description | Type |
---|---|---|
| (Required) The name of the action | String |
| The text used to display the item in the menu bar Note: If unspecified, the Name will be used as the title. | Dictionary |
| Determines if the item is displayed in the menu or not Note: All commands in the Show command must return true for the menu item to display. | Array |
| Contains the action. | Array |
| Determines what happens after the action is run. | Array |
| The unique ID for the action | String |
| Determines if the action set should only be run when connected to an Active Directory domain | Boolean |
| Length in minutes between executing the action | Integer |
| The text displayed when hovering over a menu item | String |
| Creates a visual separator bar in the menu bar |
Self Service+ has built-in commands that can be used to execute action items. Consider the following about commands:
All options are strings.
All commands can return results.
Results do not persist between commands.
CommandOptions
support the standard Self Service+ variables such as<<domain>>
,<<user>>
, and<<email>>
.Commands are case sensitive.
Command | Function | Command Options |
---|---|---|
| Executes a binary at a specific file path | The path to execute |
| Opens an application at a specific file path | The path of the application to open |
| Opens a URL in the user's default browser | The URL to open |
| Pings a host | The host to ping |
| Determine if the current user is a member of an Active Directory group | The group to test |
| Displays a modal dialog to the user
| The alert text Note: If the command options are blank or are either "true" or "false", no alert will display. You can use this to show only errors. |
| Displays a notification in the notification center
| The notification text Note: If the command options are blank or are either "true" or "false", no notification will display. You can use this to show only errors. |
| A command that always returns false. This could be used to clear previous results in a command set | Text |
| A command that always returns true. This could be used to clear previous results in a command set | Text |