Quantcast
Channel: Forums - Geoprocessing
Viewing all articles
Browse latest Browse all 1952

Username of the current user (python geoprocessing tool)

$
0
0
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:

Code:

import getpass
getpass.getuser()

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

Viewing all articles
Browse latest Browse all 1952

Trending Articles