4.1.5 Example of SetPassword

In this section, there is an example of a SetPassword request, a SetPassword response, and a SetPassword fault.

SetPassword SOAP request:

 <soapenv:Envelope
     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
     xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <soapenv:Header>
     <wsa:Action soapenv:mustUnderstand="1">http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManagement/SetPassword</wsa:Action>
     <ca:Server
         xmlns:ca="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions"
         xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions">ldap:389</ca:Server>
     <wsa:MessageID>urn:uuid:926ae408-bee6-4922-8f9a-0cd61e1e470b</wsa:MessageID>
     <wsa:ReplyTo>
       <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
     </wsa:ReplyTo>
     <wsa:To soapenv:mustUnderstand="1">net.tcp://server01.fabrikam.com:9389/ActiveDirectoryWebServices/Windows/AccountManagement</wsa:To>
   </soapenv:Header>
   <soapenv:Body
         xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <SetPasswordRequest xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions">
       <AccountDN>CN=Guest,CN=Users,DC=fabrikam,DC=com</AccountDN>
       <NewPassword>Password</NewPassword>
       <PartitionDN>DC=fabrikam,DC=com</PartitionDN>
     </SetPasswordRequest>
   </soapenv:Body>
 </soapenv:Envelope>

SetPassword SOAP response:

 <soapenv:Envelope
     xmlns:wsa="http://www.w3.org/2005/08/addressing"
     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header>
     <wsa:Action soapenv:mustUnderstand="1">http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManagement/SetPassword</wsa:Action>
     <wsa:RelatesTo>urn:uuid:926ae408-bee6-4922-8f9a-0cd61e1e470b</wsa:RelatesTo>
     <wsa:To soapenv:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <SetPasswordResponse xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions"></SetPasswordResponse>
   </soapenv:Body>
 </soapenv:Envelope>

SetPassword SOAP fault:

 <soapenv:Envelope
     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
     xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <soapenv:Header>
     <wsa:Action soapenv:mustUnderstand="1">http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault</wsa:Action>
     <wsa:RelatesTo>urn:uuid:926ae408-bee6-4922-8f9a-0cd61e1e470b</wsa:RelatesTo>
     <wsa:To soapenv:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <soapenv:Fault>
       <soapenv:Code>
         <soapenv:Value>soapenv:Sender</soapenv:Value>
         <soapenv:Subcode>
           <soapenv:Value xmlns:ca="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions">ca:SetPasswordFault</soapenv:Value>
         </soapenv:Subcode>
       </soapenv:Code>
       <soapenv:Reason>
         <soapenv:Text xml:lang="en-US">The operation failed because of a bad parameter.</soapenv:Text>
       </soapenv:Reason>
         <soapenv:Detail>
           <SetPasswordFault
             xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
             <ArgumentError xsi:nil="true"></ArgumentError>
             <DirectoryError xsi:nil="true"></DirectoryError>
             <Error>The specified Authenticable principal was not found.</Error>
             <ShortError>NoSuchAuthenticablePrincipal</ShortError>
           </SetPasswordFault>
         </soapenv:Detail>
     </soapenv:Fault>
   </soapenv:Body>
 </soapenv:Envelope>