I'm looking to run the command "jamf policy -event UserConfig" via a LaunchAgent. Here's the relevant bit of the LaunchAgent:
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/jamf</string>
<string>policy</string>
<string>-event</string>
<string>UserConfig</string>
</array>
The last of the policies triggered by UserConfig deletes the LaunchAgent for that user so it only runs once.
But LaunchAgents are run as the user, and the jamf binary requires root. So I can add a sudo, but most users are not members of sudoers, so that too would not work.
Is there a way around this? I'm finding the login/logout hooks unreliable.
Appreciate any insight.
EDIT: My title... is... not what I'm asking. Why/how did I write that?