getUser

Function

import { getUser } from '@esri/arcgis-rest-users';
//
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 | IGetUserRequestOptions

options to pass through in the request

Returns

Promise<IUser> - A Promise that will resolve with metadata about the user

Property Type Notes
access Optional string
assignedCredits Optional number
availableCredits Optional number
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[]
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[]
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[]
thumbnail Optional string
units Optional string
username Optional string

Function defined in packages/arcgis-rest-users/src/get.ts:37