Skip Navigation

REST function

Function: lookupuser
REST call URI: http(s)://server/api/lookupuser
Verb: POST
Comments: Required request is JSON
{ "Account":"testuser@example.com", "SearchKey":"Tom", "MaxNumber":10, "SearchContacts":"true" "UserShape":[attribute1, attribute2, attribute3, and so on] }
The following table describes the request properties you can include in the REST function JSON file: 
Name
Type
Description
Account
String
This property specifies the email or SMTP address of the requestor.
SearchKey
String
This property specifies the search string to look for. 
MaxNumber
Integer
This property specifies the maximum number of users or objects to return in the search query. 
If the maximum number is less than or equal to zero, 
BEMS
 returns all the users with the search key.
SearchContacts
Boolean
This property specifies whether to search for users in the private contact folder in addition to the company directory.
UserShape
String Array
This property specifies the list of attributes to return in the search results. See the following table for a list of user shape options. 
BEMS
 tries to match the user key against the following user data stored in the company directory (typically 
Microsoft Active Directory
):
  • Last Name
  • Display Name
  • Full Name
  • Alias
  • Email Address
  • Phone  number
    *
    *
     To allow users to search for other users in the GAL using a phone number, see Searching for users by phone number.
The following table describes the user shapes you can use when you specify the UserShape request property:
Name
Type
Example
Alternative name
FullName
String
"James Lambier”
DisplayName
String
"James Lambier”
GivenName
String
"James”
FirstName
Surname
String
"Lambier"
Lastname
EmailAddress
String
"jlambier@example.com"
Email
AlternativeEmailAddresses
String array
["x400:C=US;A= ;P=Example Technology;O=SF Bay Area;S=Lambier;G=James;", "X400:C=US;A= ;P=BlackBerry Limited;O=SF Bay Area;S=Lambier;G=James;", "EUM:7910;phone-context=SVL Dial Plan.example.com"]
PhysicalAddresses
Object array
[{"Street":"3001 Bishop Dr", "City":"San Ramon", "State":"CA","Country":"United States"}]
Addresses
PhoneNumbers
Object array
[{"Key":"Business", "Value":"+1-519-555-0100"}, {"Key":"Home", "Value":"+1-519-555-0100"}]
Department
String
"Development"
JobTitle
String
"KB Page Writer
Title
CompanyName
String
"BlackBerry"
Company
OfficeLocation
String
"SANRAMON"
Location, Office
HasPhoto
Bool
True
HasPicture
Photo
Base64 string
"dG9tIGp1bmp1biBsaXUncyBwaG90bw=="
Picture
Alias
String
"jsmith"
SMIMECertificate
Base64 string
"dG9tIGp1bmp1biBsaXUncyBwaG90bw=="
ManagerDisplayName
String
"Jeff Holleran"
ManagerName
ManagerEmailAddress
String
"jholleran@example.com"
ManagerEmail
DirectReports
Object array
[{"Name": "James Lambier", "Email": "jlambier@example.com"}, {"Name": "Paul Morley", "Email":"pmorley@example.com"}]