Running Self Service Policy from Jamf Connect Menu Bar

anotheruser
New Contributor II

Hello,

I am attempting to create a custom Jamf Connect Menu Bar using the second example from Jamf's documentation (https://learn.jamf.com/bundle/jamf-connect-documentation-current/page/Custom_Menu_Bar_Action_Items.h.... While on a brief call with Jamf about work arounds for the 802.1X PI, I was told to use the command of "open url" to the self service policy. I am referencing the install item URL template (https://learn.jamf.com/bundle/jamf-pro-documentation-current/page/Jamf_Self_Service_for_macOS_URL_Sc...), but I am struggling with the XML in the PLIST and it keeps telling me my formating is wrong because I don't know which commands to use exactly; if I'm even going about this correctly. Does anyone have any examples of a PLIST running a policy from Self Service from their Menu Bar?

Thank you

1 ACCEPTED SOLUTION

A_Collins
New Contributor III

You need to replace ampersand (&) with &

jamfselfservice://content?entity=policy&id=XXX&action=execute

View solution in original post

5 REPLIES 5

Nicholaus
Contributor

Have you tried the Jamf Connect Configuration utility? The app has an easy-to-use GUI so there's no need to worry about XML formatting. It comes bundled in the Jamf Connect download.

Honestly, I could never get the Menu Bar working correctly when using the Configuration utility, so I switched to setting it as a Jamf App in Jamf Pro. Looking at it again, I don't understand how to get custom menu bar actions working when it only gives you a single Key for actions and a single String for the label, but no where to define the action. Again, I might be complelely misunderstanding how to set this up without a visual of similar situation as to what I'm trying to accomplish. Thanks for the suggestion though. I do wish the Configuraiton utility was a bit more robust.

anotheruser
New Contributor II

This is the XML I'm working with, and as far as I've read with other PLIST, I'not sure why it isn't working. I've made the part that breaks it bolded and green. I replaced the open calculator from the exmaple from Jamf with what I was hoping would run the policy.

 

<?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>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>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>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>url</string>
<key>CommandOptions</key>
<string>jamfselfservice://content?entity=policy&id=XXX&action=execute</string>
</dict>
</array>
<key>Name</key>
<string>Check-in</string>
</dict>
</array>
</dict>
</plist>

A_Collins
New Contributor III

You need to replace ampersand (&) with &amp;

jamfselfservice://content?entity=policy&amp;id=XXX&amp;action=execute

That did it. Thank you!