---
sourceDocument: Xanadu ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/servicenow-platform

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Update AD Object activity

# Update AD Object activity {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The Update AD Object activity updates an object in Windows Active
Directory.
This activity only replaces existing values with new values. It cannot add new values to AD
records such as adding a new group member to an AD group. For complex AD operations, use the
[Run PowerShell activity](https://www.servicenow.com/docs/sdx3Xsk3hvz~jh_mSIqAdw#r_RunPowershellActivity "The Run PowerShell activity executes Windows PowerShell commands on a MID Server.") instead. The
activity fails if it cannot find an existing account with matching object name and data.  
To access this activity in the Workflow Editor, select the Custom tab, and then navigate to Custom ActivitiesActive Directory.  
Note:  
This activity replaces an AD activity by the same name available in prior releases. If you have a workflow that uses the deprecated activity, your workflow will continue to work normally after upgrading to Instanbul. However, all new workflows must use the custom version of this activity, which was built with the [PowerShell activity designer](https://www.servicenow.com/docs/8l1dwdMTCZc0KE~_ZaWj0g "PowerShell activities are configured to return data to a workflow from a host using Microsoft PowerShell.").

## Input variables

{#r_UpdateADObject__table_yss_srh_dp__entry__2}

| Variable | Description |
|-|-|
| DomainController | IP address of the domain controller machine. |
| ObjectName | The sAMAccountName of the Active Directory object. |
| ObjectData | A JSON object containing Active Directory properties and their values. For example, to set the first name, last name, and title of a user, clear the user's manager, and set the VIP flag to true, the Object Data specifies: { "givenName" : "John", "SN" : "Doe", "title" : "Sr. Account Specialist", "manager" : null, "msTSAllowLogon" : false } |
| Type | The object type to update: user, group, or computer. |
[Table 1. Update AD Object input variables]

{#r_UpdateADObject__table_yss_srh_dp}

## Output variables

{#r_UpdateADObject__table_xlg_tpb_ts__entry__2}

| Variable | Description |
|-|-|
| result | Either success or failure. |
| errorMessage | The executionResult.errorMessages from the [Activity designer parsing sources](https://www.servicenow.com/docs/yuXlPHGwUxbemWJ0MfbuTA#r_ActivityDesignerParsingSources "This table lists the parsing sources available with each execution template."). |
[Table 2. Update AD Object output variables]

{#r_UpdateADObject__table_xlg_tpb_ts}

## Conditions

{#r_UpdateADObject__table_yhr_xpb_ts__entry__2}

| Condition | Description |
|-|-|
| Success | AD object was successfully updated. |
| Failure | An error occurred while attempting to update an AD object. Additional details may be available in the workflow log. |
[Table 3. Update AD Object conditions]

{#r_UpdateADObject__table_yhr_xpb_ts}

*[\>]: and then


