I managed to solve this one after days of trial and error.I ended up
using this article to monitor the logs as the process was running to
call my apple Script. It pointed to the jamf daemon.
https://scriptingosx.com/2020/09/avoiding-applescript-secur...