getUser

Function
import { getUser } from '@esri/arcgis-rest-portal';
//
getUser("jsmith")
  .then(response)
// => { 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().

Parameters

Parameter Type Default Notes
requestOptions Optional string | IGetUserOptions

options to pass through in the request

Returns

A Promise that will resolve with metadata about the user

Promise<IUser>
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