I have a script that runs as a launchagent but since Mojave's release, we haven't been able to get it to run. I codesigned the script and verified it's still codesigned during deployment and have every PPPC config profile I can think of applied to the machines but I see these two end results when it tries to execute:
execution error: Not authorized to send Apple events to Finder. (-1743)
internal_TCCCreateDesignatedRequirementIdentityFromMessage: Refusing TCCCreateDesignatedRequirementIdentityFromAuditToken (kTCCServiceAppleEvents) RESP:{ID: com.apple.bash, PID[27621], auid: 639612192, euid: 639612192, responsible path: '/Library/Scripts/nameofscript.sh', binary path: '/bin/bash'}, ACC:{ID: com.apple.osascript, PID[27658], auid: 639612192, euid: 639612192, binary path: '/usr/bin/osascript'}, REQ:{ID: com.apple.appleeventsd, PID[65], auid: 55, euid: 55, binary path: '/System/Library/CoreServices/appleeventsd'}: unable to compute designated requirement for: file:///Library/Scripts/nameofscript.sh.,
The script calls finder to mount a user's Active Directory Home drive:
osascript -e " tell application "Finder" mount volume "${REMOTE_MOUNT_POINT}" end tell
Does anyone know if I am just simply missing something to whitelist or is this simply not possible to do with a codesigned script running as a launch agent?