Direct Inward Dialing: +1 408 916 9393
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:
|
*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:
Reserved characters include ; / ? : @ = &
Unsafe characters include < > # % { } | \ ^ ~ [ ] ` "'
Special key | Operator | Value |
mustChangePwd | equal | true, false |
accountStatus | equal, notEqual | enabled, disabled |