I was able to pull the user name out of the jobinfo.json file that is created when a GP tool runs. This file ends up in the Jobs directory where the results of GP tools end up. Such as: c:\arcgisserver\directories\arcgisjobs\<folder name>\<service>_gpserver\<job id>\jobinfo.json The jobinfo.json file has the user and the machine that ran the service. A new directory with GP results gets created when the code runs. I snag the path and job id by using arcpy.env.scratchFolder. Then I read the jobsinfo.json file to grab the user and write it to a log.
... View more