import getpass ... print(getpass.getuser())
Hi. Few years ago I solved it by decripting token send by the GP Service. I prepared DecryptArcGISToken.exe console app that was called from inside a Python script. It uses ESRI.ArcGIS.TokenService.dll
Maybe there is something for Portal too, asuming majority of apps uses Portal authentication.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.