List Active Directory Users

Use this API Call to query our Data Extraction API to extract data gathered by N-sight RMM.This section shows the service name and parameters needed in the API Call query, and provides examples of some queries and system responses. For more information, see Data Extraction API.

API Call Frequency — Each API call uses system resources when querying and returning data. To avoid performance issues, do not send automated API calls using a frequency less than 90 seconds. We may contact you if we detect API activity that negatively impacts system performance.

Service name: list_active_directory_users

URL

https://SERVER/api/?apikey=yourAPIkey&service=list_active_directory_users

&required_parameters=required_parameters

[&optional_parameters=optional_parameters]

Description

Lists Active Directory user details for a the specified site

Parameter Description Type Required Options Default
describe Optional. Returns a description of the service. boolean no true 0
siteid The identifier for the target site integer yes 0 0

Example Service Call = list_active_directory_users

https://SERVER/api/?apikey=yourAPIkey&service=list_active_directory_users&siteid=SITEID

Example Response

<result created="2012-05-25T16:32:31+01:00" host="SERVER" status="OK">
<users count="156" updated="2012-05-24T22:35:01+01:00">
<user objectGUID="0020A0AA4A3AD74898C7985F252CECBC" status="3" device="168510">
<distinguishedName>
<![CDATA[
CN=MT Support Sharepoint,OU=Mail Accounts,OU=Technical Support,OU=Inverness,OU=Office Locations,DC=test,DC=com
]]>
</distinguishedName>
<mail>
<![CDATA[ MTSupport.Sharepoint@test.com ]]>
</mail>
<givenName>
<![CDATA[ MT Support ]]>
</givenName>
<sn>
<![CDATA[ Sharepoint ]]>
</sn>
<displayName>
<![CDATA[ MT Support Sharepoint ]]>
</displayName>
<userPrincipalName>
<![CDATA[ mtsupportsharepoint@test.com ]]>
</userPrincipalName>
<description>
<![CDATA[ Support Department Sharepoint Server ]]>
</description>
<department>
<![CDATA[ Support ]]>
</department>
<pwdLastSet>1230629179</pwdLastSet>
<whenCreated>1230628385</whenCreated>
<whenChanged>1336942843</whenChanged>
</user>
....
</result>
					

Fields Description

Field

Type

Can Be Empty

Description

user@objectGUID

string (hex)

no

objectGUID LDAP property, which is used as the user object's unique identifier and always queried

user@status

integer

no

Status ID:

0

unchanged

1

change unknown (can occur if when Changed field is not queried and field count differs)

2

modified

3

new

4

deleted

5

restored

user@device

integer

no

Identifier of the device at which the user was found

user/< any >

-

no

This section contains any populated user field that is selected as an Available Field for the Active Directory Users Query Automated Task and matches a valid LDAP display name.

Values returned from the Active Directory are not always strings, but the script attempts to convert all values to strings.

Date objects are converted to timestamps (UTC epoch).

If a value is null then that field (index) for the user is omitted.

Example Associated Service Calls
Parameter Call URL Format
SiteID list_sites https://SERVER/api/?apikey=yourAPIkey&service=list_sites&clientid=CLIENTID
ClientID list_clients https://SERVER/api/?apikey=yourAPIkey&service=list_clients

Where do you want to go?