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

 
 
 
 
 
List Group Members
 

List group members

Use this API to list the members of an AD group in Active Directory (AD) from your application.

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

Request parameters:

Following are the request parameters that can be used to fetch the members of an AD group:

Parameter name Mandatory Description
domainName Yes Name of the domain where the group is located.
AuthToken Yes Authentication Token obtained using the Generate AuthToken API.
inputFormat Yes Details of the AD group whose members have to be listed. This attribute should be JSONArray string and must be specified in this format:
[<JSONObject>,<JSONObject>,<JSONObject>]; JSONObject - key/value pair of LDAP attributes and their corresponding values.
PRODUCT_NAME Yes Product name/module name from which the request is being sent; will be needed for auditing.
refresh Yes Server will be refreshed to update the changes made to the AD group in ADManager Plus.

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
sAMAccountName sAMAccountName of the group members.
Members Members of the groups.

Sample Input / Output

Request:

http://Byron:8080/RestAPI/ListGroupMembers?domainName=division-dc1.local&AuthToken=ec090943-a2ec-4bef-bf91-eca30fa09838&inputFormat=[{"sAMAccountName":"Account Operators"},{"sAMAccountName":"Sales Department"}]&PRODUCT_NAME=MODULE&refresh=false

Response:

[
    {
        "sAMAccountName": "Account Operators",
        "Members": {
            "Count": 3,
            "Users": [
                {
                    "sAMAccountName": "Andy Jones",
                    "domainName": "division-dc1.local"
                }
            ],
			"Computers": [
                {
                    "sAMAccountName": "Accounts Desktop",
                    "domainName": "division-dc1.local"
                }
            ],
			"Contacts": [
                {
                    "sAMAccountName": "Charlie M",
                    "domainName": "division-dc1.local"
                }
            ]
        }
    },
	{
        "sAMAccountName": "Sales Department",
        "Members": {
            "Count": 2,
            "Users": [
                {
                    "sAMAccountName": "John Smith",
                    "domainName": "division-dc1.local"
                }
            ],
			"Computers": [
                {
                    "sAMAccountName": "Sales Desktop",
                    "domainName": "division-dc1.local"
                }
            ]
        }
    }
]

			

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