My guess is "Self Service.app" has been denied access to accessibility services.
The strange part is that I am not receiving a prompt to allow any apps (Self Service or AppleScript) access to Accessibility Services.... and other apple scripts (that don't interact with the UI) are working fine....
10.9 did introduce more strict controls over what is allowed to manipulate the GUI. Instead of a global "Enable Access for Assistive Devices" checkbox, you now need to allow access per application.
There's another thread here that details how to programmatically write in the settings to allow a specific application access to that. But since you're talking about an Applescript, not an application, I'm not certain if that's what's going for you. It could be you need to give Self Service access to the assistive devices controls. but in the interim, I would try this syntax instead and see if it works.
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preferences.sharing"
end tell
Also consider wrapping it up in a shell script instead of a pure Applescript. You may have better luck getting it to run.
@mm2270 I attempted your syntax, but had the same results - it triggers the system preferences, but does not activate the window or open the sharing pane. I am going to try wrapping it in a shell script to see if i get better results.
If it doesn't work even after wrapping it into a shell script, then you may need to resort to doing the /bin/launchctl bsexec route. I've needed to do that with quite a few scripts going forward, as the OS is getting more strict about allowing applications to be launched as the user. So we need to run commands in the context of the user's space, or it gets blocked.
I ended up dropping the applescript as a .app onto the local machine, then calling it via JSS - Execute Command:
/Library/Application Support/JAMF/Scripts/OpenSharingMavericks.app/Contents/MacOS/applet
Seems to be working well! Thanks for the recommendations, much appreciated.