Trying to turn this off.

So far I have tried some defaults write commands that have been able to change the idle time but not disable the setting.
I found an Apple Script that works wonderfully when used locally but will not deploy through JSS.
osascript -e 'tell application "System Events" to set require password to wake of security preferences to false'
I have tried it in Files and Processes as a one line command and also tried deploying in a bash script.
It fails in JSS with this message:

Any knowledge and education would be greatly appreciated.
John



