I'm trying to get the currently logged in username in an Arcade expression in ArcPro 2.8. I've used the GetUser(Portal('https://www.arcgis.com')) to populate the user id, username, name, email etc. in a big long string, but I only want the username. How can I do that? Seems like it should be fairly straight forward.
Solved! Go to Solution.
For anyone searching how to do this, and finding this thread, you can also do the following:
In case anyone else gets here while troubleshooting - this was the solution for me for about a year, but somehow upgrading to ArcGIS Pro 3.6.0 has broken it. I'm getting an unexpected null. I'm signed in to the portal just fine - nothing changed but the upgrade.