ChangeUserPassword (OP-10)¶
Request and response¶
| Part | Type | Description |
|---|---|---|
inUserId |
String |
The SamAccountName of the account whose password is reset. |
inNewPassword |
String |
The new password, carried as a plaintext SOAP string parameter (SEC-06 — see Authentication and authorization). Never reproduce example values in documentation; use <value> placeholders only. |
| Part | Type | Description |
|---|---|---|
<return> |
ADServiceResponse |
Response is Success, UserDoesNotExist, or Failure. Message carries the caught exception text on a Failure, otherwise empty. |
WebMethod attributes¶
<WebMethod()> — bare, no arguments supplied.
Steps¶
CheckAccess(); on denial returnAccessDenied()(BR-01).- Initialize the response sentinel to
Success. - Open
Try; call the private helper H6ChangePassword(inUserId, inNewPassword)and assign itsEResponseresult toResponse(BR-25). - H6 selects the external domain via H1, resolves the user with
UserPrincipal.FindByIdentitydirectly (returningUserDoesNotExistwhenNothing), and otherwise invokesSetPasswordon the underlyingDirectoryEntry(late-bound) followed byCommitChanges(). H6 itself contains noCatch— every failure inside it propagates to this operation's ownTry. Catch ex As Exception→ setResponse = Failure,Message = ex.Message(BR-26).- Return the response sentinel.
Process flow¶
flowchart TD
A["Call ChangeUserPassword"] --> B{"CheckAccess<br>HasAccess?"}
B -->|"No"| C["Return AccessDenied"]
B -->|"Yes"| D["Try: call H6 ChangePassword"]
D --> E["H6: FindByIdentity<br>external domain"]
E -->|"Nothing"| F["H6 returns UserDoesNotExist"]
E -->|"Found"| G["H6: SetPassword + CommitChanges"]
F --> H["Assign Response<br>from H6 result"]
G --> H
H --> I["Return response"]
D -.->|"Any exception<br>from H6 or context"| J["Catch: Set Failure + ex.Message"]
J --> I
Shared state effects¶
None — this operation touches no process-wide state; all locals are per-request.
Error handling¶
The operation never surfaces a framework SOAP fault: a rejected password (policy, history, complexity) or any other directory failure inside H6 is caught here and flattened into Response = Failure with the raw .NET exception text in Message. Compare with ChangeUserPasswordOrGetException, which invokes the same helper with no exception handling. See Faults for the service-wide fault model.
Authorization¶
Gated by BR-01: the caller must pass the IP allow-list check enforced by CheckAccess. See Authentication and authorization.
Related documentation¶
- Service index
- Overview
- Architecture
- Activation and hosting
- Operations
- Operations and processes
- Business rules
- Authentication and authorization
- Configuration
- Dependencies
- Faults
- Operational runbook
- Tech debt
Sources¶
src\ADUserServices\clsADUserServices.asmx.vb(lines 471-491, helperChangePasswordlines 503-524)