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 Group
 

Search group API

Use this API to search for a group in Active Directory (AD) from your application.

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

Request parameters

The following are the request parameters that can be used when searching for an AD group:

Parameter name Mandatory Description
domainName Yes The domain where the group is located
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.
RANGE Yes The number of group details to be returned in the response
FROM_INDEX Yes The starting index for the group details result
searchText Yes The text that must be used to search the group
PRODUCT_NAME Yes The product name or module name from which the request is being sent; this is needed for auditing
refresh No This refreshes the server to update the changes made to AD groups in ADManager Plus
isPrimaryGroup No This lists the global security groups in the domain

Response:

The response will be a JSON array string with a list of JSONObjects. Each JSONObject in the list represents an object sent in the inputFormat attribute in the request. Each object will contain the following properties about the status:

Parameter name Description
GROUP_NAME The name of the group
DISTINGUISHED_NAME The distinguished name of the group
SAM_ACCOUNT_NAME The sAMAccountName of the group
MANAGER The manager of the group
GROUP_TYPE The type of the group

Sample Input / Output

Request:

http://Byron:8080/RestAPI/SearchGroup?AuthToken=ec090943-a2ec-4bef-bf91-eca30fa09838&domainName=division.com&RANGE=100&FROM_INDEX=1&searchText=Department&PRODUCT_NAME=MODULE&isPrimaryGroup=true

Response:

[
    {
        "GROUP_NAME": "Finance Department",
        "DISTINGUISHED_NAME": "CN=Finance Department,CN=Users,DC=division,DC=com",
        "SAM_ACCOUNT_NAME": "Finance Department",
		MANAGER": "TestManager1",
		"GROUP_TYPE":"Security"
    },
    {
        "GROUP_NAME": "Production Department",
        "DISTINGUISHED_NAME": "CN=ProductionDepartment,CN=Users,DC=division,DC=com",
        "SAM_ACCOUNT_NAME": "Production Department",
		"MANAGER": "TestManager2",
		"GROUP_TYPE":"Security"
    },
    {
        "GROUP_NAME": "Marketing Department",
        "DISTINGUISHED_NAME": "CN=Marketing Department,OU=Finance-OU,DC=division,DC=com",
        "SAM_ACCOUNT_NAME": "Marketing Department"
		"MANAGER": "TestManager3",
		"GROUP_TYPE":"Security"
    },
    {
        "GROUP_NAME": "Account Operators",
        "DISTINGUISHED_NAME": "CN=Account Operators,OU=Finance-OU,DC=division,DC=com",
        SAM_ACCOUNT_NAME": "Account Operators",
		"MANAGER": "TestManager4",
		"GROUP_TYPE": "Distribution"
    },
    {
        "GROUP_NAME": "Administrators",
        "DISTINGUISHED_NAME": "CN=Administrators,OU=HR,DC=division,DC=com",
        "SAM_ACCOUNT_NAME": "Administrators",
		"MANAGER": "TestManager5",
		"GROUP_TYPE": "Distribution"
    }
]
			

Note:

  • The default admin account will not be considered a HDT.
  • 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 the purview ADManager Plus, encoding the URL for special, reserved and unsafe characters is solely the users' responsibility.

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

ADManager Plus Trusted By

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