Custom Menu Bar Action Items
Jamf Connect allows you to create custom action items in the menu bar app. 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 Jamf Connect menu bar app 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

Action Item Configuration Profile Example
<plist version="1.0">
<dict>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadDisplayName</key>
<string>Jamf Connect Actions</string>
<key>PayloadDescription</key>
<string>Jamf Connect Actions</string>
<key>PayloadOrganization</key>
<string>Jamf</string>
<key>PayloadUUID</key>
<string>27870006-41CB-4694-A6AD-709073670851</string>
<key>PayloadEnabled</key>
<true/>
<key>PayloadScope</key>
<string>System</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadIdentifier</key>
<string>com.jamf.connect.actions</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.jamf.connect.actions</string>
<key>PayloadDisplayName</key>
<string>Jamf Connect Actions</string>
<key>PayloadDescription</key>
<string>Jamf Connect Actions Settings</string>
<key>PayloadOrganization</key>
<string>Jamf</string>
<key>PayloadUUID</key>
<string>98B42AF5-4040-47D1-9F6F-A0E1D7FBFC26</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadIdentifier</key>
<string>com.jamf.connect.actions</string>
<key>Version</key>
<integer>1</integer>
<key>Actions</key>
<array>
<dict>
<key>Title</key>
<dict>
<key>Command</key>
<string>path</string>
<key>CommandOptions</key>
<string>/usr/sbin/ipconfig getifaddr en0</string>
</dict>
<key>ToolTip</key>
<string>Primary IP Address</string>
<key>Name</key>
<string>en0</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>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>/System/Applications/Calculator.app</string>
</dict>
</array>
<key>Name</key>
<string>Open the macOS Calculator</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
Action Preference Key Reference
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.
Global Preferences
The following table includes the global preferences for a custom menu bar action configuration profile.
Key | Description | Type |
---|---|---|
| Determines if the action menu will display a status icon (green, yellow, or red) Note: | Boolean |
| When set to true, Jamf Connect will use the result of the command as the text of the menu item. Note: | Boolean |
Action Content
Key | Description | Type |
---|---|---|
| (Required) The name of the action | String |
| The text used to display the item in the menu bar Note: If unspecified, the | Dictionary |
| Determines if the item is displayed in the menu or not Note: All commands in the | 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 |
|
Commands
The Jamf Connect 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 Jamf Connect 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 |