Has anyone tried or succeeded in recovering the ArcGIS for Server (AGS) user name used in the connection?
I need this because I'm doing some edits to a Enterprise GDB, SQL Server with the same user and password, but also restricted to edit area extent related to the user. At this moment I have solved this by entering user and password every time the gptool is called, but that's a lot of work for users. So to recover/reuse the user without asking this every time would be better. Password might not be necessary because AGS has already validated, and exists in a sde connection file too, but user is really needed to identify the area the user could edit.
The idea is these steps:
User enter his user and password and create a connection to AGS Server as a user.
Run the deployed gptools (developed with python).
gptool identify the user from the AGS Connection and use this to try to validate if they have access to SQL ArcSDE (instead of entering every time the user and password).
once cheked to SQL Server, identify the area where he could work based on a relation User / Area
All this is done except recover the AGS User from the connection. Any help with that?
Version used for products is 10.1 SP 1.