Retrieve a user’s details via a Portal.

Use case
Portal information can be used to build a user interface. For example, the portal user’s thumbmnail can be shown to indicate that they are currently logged in.
How to use the sample
Enter your ArcGIS Online credentials for the specified URL.
How it works
- Present the user with an editable text field for entering a portal URL.
- Create and load a portal with the URL.
- If the portal is secured, it may potentially issue an authentication challenge.
- Display the desired portal info once loading has successfully completed. Otherwise, if loading failed, display the error.
- Upon successful login, get a
PortalUserusingportal.user. Get user attributes using:portalUser.portalNameportalUser.usernameportalUser.emailportalUser.creationDateportalUser.thumbnail.image
- The “Sign out” button clears any saved credentials.
Relevant API
- OAuthUserConfiguration
- Portal
- PortalInfo
- PortalUser
About the data
This sample signs into your ArcGIS online account and displays the user’s profile information.
Tags
account, avatar, bio, cloud and portal, email, login, picture, profile, user, username