---
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


---

# Change AD User Password activity

# Change AD User Password activity {#ariaid-title1}

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

The Change AD User Password activity changes the password for an Active Directory user
account.
This activity requires the user's current password to run, unlike the [Reset AD User Password](https://www.servicenow.com/docs/R~XkuxxvF9gJmTkE5msv_w "The Reset AD User Password activity resets the password of a user account in Windows Active Directory.") activity. If the new password violates any Active Directory
password requirements, such as length or character combinations, the activity fails and
returns the appropriate error message. This error message appears in the ECC queue and in
hint text when a user points to the activity in the Workflow Editor.  
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_ChangeADUserPassword__table_wxp_5kh_dp__entry__2}

| Variable | Description |
|-|-|
| DomainController | IP address of the domain controller machine. |
| User | The sAMAccountName of the Active Directory user account. |
| New_password | The new password to assign this user. |
| Old_password | The user's current password. |
[Table 1. Change AD User Password input variables]

{#r_ChangeADUserPassword__table_wxp_5kh_dp}

## Output variables

{#r_ChangeADUserPassword__table_zqz_ftt_ss__entry__2}

| Variable | Description |
|-|-|
| result | One of the following outcomes: * failure * success * Policy Failure * Incorrect old password {#r_ChangeADUserPassword__ul_ekn_gsl_zs} |
| 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."). |
| hresult | Powershell command result. |
[Table 2. Change AD User Password output variables]

{#r_ChangeADUserPassword__table_zqz_ftt_ss}

## Conditions

The activity provides the following conditions:{#r_ChangeADUserPassword__table_bdg_krz_ss__entry__2}

| Condition | Description |
|-|-|
| Success | Password successfully reset. |
| Policy Failure | Password does not comply with the organization's Active Directory requirements. |
| Incorrect old password | Password being changed was not entered correctly. |
| Failure | An error occurred while attempting to change the password. Additional details may be available in the workflow log. |
[Table 3. Change AD User Password conditions]

{#r_ChangeADUserPassword__table_bdg_krz_ss}

## Active Directory credentials with LDAP

If you are using an LDAP Server with MID Servers, note that Orchestration and Active
Directory activities do not use the user name and password configured on LDAP Servers. You
must create a [Windows type orchestration credential
record](https://www.servicenow.com/docs/access?context=r_WindowsCredentialsForm&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US)
[Windows credentials](https://www.servicenow.com/docs/access?context=r_WindowsCredentialsForm&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US). The username and password in the
credentials record is used for LDAP queries that Orchestration and workflow activities
perform.

*[\>]: and then


