getUser

getUser

Function
getUser(requestOptions?string | IGetUserOptions): Promise<IUser>

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

Use dark colors for code blocksCopy
1
2
3
4
5
import { getUser } from '@esri/arcgis-rest-portal';
//
getUser("jsmith")
  .then(response)
// => { firstName: "John", lastName: "Smith",tags: ["GIS Analyst", "City of Redlands"] }
Parameters
ParameterTypeNotes
requestOptions
string | IGetUserOptions

options to pass through in the request

Returns 
Promise<IUser>

A Promise that will resolve with metadata about the user

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.