Select to view content in your preferred language

GetUser - need only user name

12018
11
Jump to solution
07-29-2021 08:59 AM
Labels (2)
LukeGilner1
Frequent Contributor

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.

11 Replies
MarkBockenhauer
Esri Regular Contributor

For anyone searching how to do this, and finding this thread, you can also do the following:

return getuser(portal('https://www.arcgis.com')).username
 
 
scardina
New Contributor

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.

0 Kudos