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.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.