I am trying to extract the success/failure of a recently called Jamf policy to be used in a script for the next steps. However, I am unable to gather from the end-user system and the Jamf Dashboard if the recently called Jamf Policy was successful. I know that if the policy has a script within, the exit code ( exit code 0) would provide whether it was executed successfully. But more importantly, the policy logs provide a STATUS. This status shows "Completed" or "Failed". That is what I am trying to extract as a condition for the script to either proceed or notify the end-user of the failure.
Has anyone been able to find a way to extract the status of a recently executed policy, no matter what it contains within (a package, a script, a UNIX command, etc..)?