Hi everyone.
I have a web mapping application and a group map shared with some user registered, the user enters by login. What I want to accomplish is to get the information of the current user in the application, like username, group id, etc...
I have tried without success using the object portal and its functions like:
var portal = new arcgisPortal.Portal('my url');
var user = portal.getPortalUser();
console.log(user);
console.log("user id: " + user.username);
But I think that what I need is to access to the portal object of the application, and this code is creating a new portal instead. I have seen that using the property credential, you can access to this info as well. Any ideas?
Thanks in advance.
Santiago,
See this thread: https://community.esri.com/thread/185734-using-portalutils-to-get-current-logged-user-wont-work-for-...