---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Query AD activity

# Query AD activity {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

The Query AD activity retrieves entries from the Windows Active Directory based on an
LDAP search filter and stores the results as a JSON string that can be used in the data
bus.
To access this activity in the Workflow Editor, select the Custom tab, and then navigate to Custom ActivitiesActive Directory.  
Hinweis:  
This activity replaces an AD activity by the same name available in releases prior to Geneva. If you have a workflow that uses the deprecated activity, your workflow will continue to work normally after upgrading to Instanbul and will continue to save query results to the scratchpad. However, all new workflows must use the custom version of this activity. This activity was built with the [Create a PowerShell activity](https://servicenow-prod.fluidtopics.net/SV5g3MJvrMeLhWdD7UG1VQ#t_CreateAPowershellActivity "Create a custom PowerShell activity return data to a workflow from a host using Microsoft PowerShell."), which stores input and output variables in the [databus](https://servicenow-prod.fluidtopics.net/8OYaonyVEUHUlQE7wAXD_w#t_ReuseDataInTheActivityDesigner "The Data tab in the Workflow Editor lists all custom activities used in the current workflow that produce data and displays that data for reuse in other custom activities.") instead of the scratchpad.

## Input variables

{#r_QueryAD__table_qjs_44h_dp__entry__2}

| Variable | Description |
|-|-|
| DomainController | IP address of the domain controller machine. |
| Properties | A comma-separated list of Active Directory properties to return. For example, givenName,SN,title. If this field is blank, then all properties are returned. |
| SearchFilter | An LDAP filter string that defines the search parameters. Use any valid LDAP filtering criteria. For example, to find user accounts matching the ServiceNow input record, use: (samaccountname=${workflow.inputs.u_user.user_name}) |
[Tabelle : 1. Query AD input variables]

{#r_QueryAD__table_qjs_44h_dp}

## Output variables

{#r_QueryAD__table_o54_yc1_ts__entry__2}

| Variable | Description |
|-|-|
| result | Either success or failure. |
| errorMessage | The executionResult.errorMessages from the [Activity designer parsing sources](https://servicenow-prod.fluidtopics.net/jecuRsCuzIyfFDyPkB_Ehw#r_ActivityDesignerParsingSources "This table lists the parsing sources available with each execution template."). |
| output | The query result. |
[Tabelle : 2. Query AD output variables]

{#r_QueryAD__table_o54_yc1_ts}

## Conditions

{#r_QueryAD__table_r4q_cd1_ts__entry__2}

| Condition | Description |
|-|-|
| Success | The query completed as expected. |
| Failure | An error occurred while processing the query. Additional details may be available in the workflow log. |
[Tabelle : 3. Query AD conditions]

{#r_QueryAD__table_r4q_cd1_ts}

