Support
 
Phone Live Chat
 
Support
 
US: +1 888 720 9500
US: +1 800 443 6694
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9393

 
 
 
 
 
Search user
 

Search user API

This API allows you to locate any user in your Active Directory.

Request URL (JSON) format: http://<hostname>:<port>/RestAPI/SearchUser

Request Parameters:

Parameter Name Mandatory Description
PRODUCT_NAME Yes Product name / module name from which the request is being sent; will be needed for auditing.
AuthToken Yes Authentication token that is generated either from the Delegation tab (Delegation > Configuration > Technician Authtokens) or from the My account tab (My Account > Active Authtokens) in the top right corner of the product.
domainName Yes Domain in which the search has to be performed.
range Yes Number of user details to be returned in the request's response.
startIndex Yes Starting index for the user details result.
searchText No Text to be used in the search.
refresh No Boolean type. On 'true', the server will refresh & update the changes in AD in ADManager Plus, and then send the updated results.
sortColumn No Any one of the columns in search result can be used to sort the result.
ascending No By default the result is 'ascending'. If 'descending' is mentioned, the result will be displayed in descending order.
select

Build 7163 and above*

No Specify the LDAP attributes that have to be displayed in the search result.
filter

Build 7163 and above*

No Specify LDAP attributes to refine the search.
domainList

Build 7180 and above*

No Specify the domains in which the user has to be searched.

Note:

  • When the domainList parameter is not specified, the users will only be searched in the domain given along with the mandatory domainName parameter.
  • When the domainList parameter is specified, the users will be searched in the domains given along with the domainList parameter and not in the domain given along with the mandatory domainName parameter.

*The parameter is supported only for the specified build numbers

Response:

The response will be a key/value pair in JSON format. The response will include the following keys.

Parameter Name Description
status Status of the search operation. 'SUCCESS' on successful completion of the request.
statusMessage Contains the appropriate message if an issues/error occurs while processing the request.
Count Total number of users on the given search criteria's.
UsersList JSONArray of the user details. Each JSONObject in the array represents a user in the search result. The JSONObject contains the key/value pair of attributes of the user and their corresponding values.

Sample Input / Output

Request:

http://Byron:8080/RestAPI/SearchUser?domainName=admanagerplus.com&AuthToken=a70d9e6c-4167-4de4-a6a1-3b3aff50c82e&range=2&startIndex=1

Response:

{"count":1139,"status":"SUCCESS","statusMessage":"","UsersList":[{"DISPLAY_NAME":"john mat","FIRST_NAME":"john","MOBILE":"-","COUNTRY":"-","OBJECT_GUID":"{25AB1089-C67 3-4CC1-AF04-D3D8C8B3D39D}","LOGON_NAME":"john-3786@csez.admanagerplusin.com" ,"CITY":"-","INITIAL":"-","EMAIL_ADDRESS":"john.a@admanagerplus.com","LAST_NAME":" mat"},{"DISPLAY_NAME":"charlie M","FIRST_NAME":"charlie M","MOBILE":"-","COUNTRY":"-","OBJECT_GUID":"{3B030A75-2F7C-4400-82E5-B738D352 970A}","LOGON_NAME":"charlie-pt1394@csez.admanagerplusin.com","CITY":"-","INITIAL":"- ","EMAIL_ADDRESS":"charlie.m@admanagerplus.com","LAST_NAME":"-"}]}

Request with filter and select parameters:

http://byron:8080/RestAPI/SearchUser?domainName=admanagerplus.com&AuthToken=a70d9e6c-4167-4de4-a6a1-3b3aff50c82e&range=3&startIndex=1&filter=(givenName:contains:john)and(sAMAccountName:contains:john)&select=givenName,sn

Response:

	    "UsersList": [
        {
            "LAST_NAME": "-",
            "FIRST_NAME": "John"
        },
        {
            "LAST_NAME": "mat",
            "FIRST_NAME": "John"
        },
        {
            "LAST_NAME": "charlie",
            "FIRST_NAME": "john"
        }
    ],
    "count": 3,
    "statusMessage": "",
    "status": "SUCCESS"
}  	

NOTE:

  • The default admin account will not be considered as a help desk technician.
  • Ensure that you URL encode all the special and reserved characters used in REST API requests. Since the client sending the request (browser, postman or TP tools) does not fall under ADManager Plus, encoding the URL for special, reserved and unsafe characters is solely the users' responsibility.

    Reserved characters include ; / ? : @ = &
    Unsafe characters include < > # % { } | \ ^ ~ [ ] ` "'

  • The filter parameter must be specified in the following format: (<LDAP/special key>:<operator>:<value> <logicalOperator> (<LDAP/special key>:<operator>:<value>.
    Example: (givenName:contains:john) or (sn:contains:smith)
    wherein,
    • Special characters (,), and \ must be escaped with a backslash when given as a value. For instance, the value "john\k(smith)" must be specified as (givenName:equal:john\\k\(smith\)).
    • LDAP attributes and special keys are case sensitive. Operators and logical operators, on the other hand, are case-insensitive.
    • The following special keys, operators and logical operators can be used:
      • Operators: equal, equalCaseSensitive, notEqual, greaterThan, greaterEqual, lessThan, lessEqual , endsWith, notEndsWith, startsWith, notStartsWith, contains, notContains, like and notLike.
      • Logical operators: and, and or.
      • Special keys: mustChangePwd and accountStatus. These special keys must be specified along with their appropriate operators and values as seen in the table below to filter a search.
        Special key Operator Value
        mustChangePwd equal true, false
        accountStatus equal, notEqual enabled, disabled

ADManager Plus Trusted By

The one-stop solution to Active Directory Management and Reporting
Email Download Link