This documentation is for ArcGIS REST JS 3.x which is no longer maintained. For the latest 4.x documentation see ArcGIS REST JS on the ArcGIS Developer website.


import { getUser } from '@esri/arcgis-rest-portal';
// => { firstName: "John", lastName: "Smith",tags: ["GIS Analyst", "City of Redlands"] }

Get information about a user. This method has proven so generically useful that you can also call UserSession.getUser().


Parameter Type Default Notes
requestOptions Optional string | IGetUserOptions

options to pass through in the request


A Promise that will resolve with metadata about the user

Property Type Notes
access Optional string
assignedCredits Optional number
availableCredits Optional number
cOrgId Optional string
created Optional number
culture Optional string
description Optional string
disabled Optional boolean
email Optional string
favGroupId Optional string
firstName Optional string
fullName Optional string
groups Optional IGroup[] | IGroup
idpUsername Optional string
lastLogin Optional number
lastName Optional string
level Optional string
mfaEnabled Optional boolean
modified Optional number
orgId Optional string
preferredView Optional any
privileges Optional string[] | string
provider Optional "arcgis" | "enterprise" | "facebook" | "google"
region Optional string
role Optional "org_admin" | "org_publisher" | "org_user"
roleId Optional string
storageQuota Optional number
storageUsage Optional number
tags Optional string[] | string
thumbnail Optional string
units Optional string
username Optional string

Function defined in packages/arcgis-rest-portal/src/users/get-user.ts:35