mbhansen

Username of the current user (python geoprocessing tool)

Discussion created by mbhansen on Jan 14, 2013
Is there a way to get the username of the current user within a python geoprocessing tool?

The username must be the name of the user logged on to my IIS web application with an ArcGIS Web Adapter.

The python script is published to an ArcGIS Server 10.1 with Active Directory and Web Tier authentication.

I have tried:

import getpass
getpass.getuser()


However, this always returns "arcgis" (properly the ArcGIS Server service user identity).

Outcomes