4.3 Example of Retrieving the Complete XML Representation of an Identity Object

In the previous example, the SOAP request specified the identity attribute types to be returned by the server. In the example in this section, the request does not specify any identity attribute types, so the server returns the XML representation of the entire identity object as the contents of a single PartialAttribute element.

As seen in the response that follows, a number of identity attributes are present that were not specified in the Create request. The values of these attributes were defaulted by the server implementation when the identity object was created.

SOAP Request Message

 <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.xmlsoap.org/ws/2004/09/transfer/Get
     </wsa:Action>
     <IdentityManagementOperation soapenv:mustUnderstand="1" 
 xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/
 DirectoryAccess" />
     <objectReferenceProperty 
        xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory">
       51419d0c-cadd-4b70-9c8d-8a73fdd2d32a
     </objectReferenceProperty>
     <instance xmlns="http://schemas.microsoft.com/2008/1/
 ActiveDirectory">
       ldap:389
     </instance>
     <wsa:MessageID>
       urn:uuid:648ec6f5-3b8e-46b5-9c4f-c9964f2773a8
     </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/Resource</wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <BaseObjectSearchRequest Dialect="http://schemas.microsoft.com/
 2008/1/ActiveDirectory/Dialect/XPath-Level-1" 
 xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/
 DirectoryAccess" >
     </BaseObjectSearchRequest>
   </soapenv:Body>
 </soapenv:Envelope>

SOAP Response Message

  
 <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.xmlsoap.org/ws/2004/09/transfer/GetResponse
     </wsa:Action>
     <wsa:RelatesTo>
       urn:uuid:648ec6f5-3b8e-46b5-9c4f-c9964f2773a8
     </wsa:RelatesTo>
     <wsa:To soapenv:mustUnderstand="1">
       http://www.w3.org/2005/08/addressing/anonymous
      </wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <BaseObjectSearchResponse xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ad="http://schemas.microsoft.com/2008/1/ActiveDirectory" xmlns:addata="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data">
       <PartialAttribute>
         <addata:user>
           <ad:objectReferenceProperty>
             <ad:value xsi:type="xsd:string">
               51419d0c-cadd-4b70-9c8d-8a73fdd2d32a
             </ad:value>
           </ad:objectReferenceProperty>
           <addata:sAMAccountName LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">$5J1000-H8LSNOEVT4KN</ad:value>
           </addata:sAMAccountName>
           <addata:userAccountControl LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">546</ad:value>
           </addata:userAccountControl>
           <addata:description LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">Sample description.</ad:value>
           </addata:description>
           <addata:otherTelephone LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">(425) 555-0100</ad:value>
             <ad:value xsi:type="xsd:string">(206) 555-0100</ad:value>
           </addata:otherTelephone>
           <addata:primaryGroupID LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">513</ad:value>
           </addata:primaryGroupID>
           <addata:instanceType LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">4</ad:value>
           </addata:instanceType>
           <addata:objectClass LdapSyntax="ObjectIdentifier">
             <ad:value xsi:type="xsd:string">top</ad:value>
             <ad:value xsi:type="xsd:string">person</ad:value>
             <ad:value xsi:type="xsd:string">organizationalPerson</ad:value>
             <ad:value xsi:type="xsd:string">user</ad:value>
           </addata:objectClass>
           <addata:pwdLastSet LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:pwdLastSet>
           <addata:badPwdCount LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:badPwdCount>
           <addata:sAMAccountType LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">805306368</ad:value>
           </addata:sAMAccountType>
           <addata:dSCorePropagationData LdapSyntax="GeneralizedTimeString">
             <ad:value xsi:type="xsd:string">16010101000000.0Z</ad:value>
           </addata:dSCorePropagationData>
           <addata:uSNChanged LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">17190</ad:value>
           </addata:uSNChanged>
           <addata:lastLogon LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:lastLogon>
           <addata:accountExpires LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">9223372036854775807</ad:value>
           </addata:accountExpires>
           <addata:logonCount LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:logonCount>
           <addata:distinguishedName LdapSyntax="DSDNString">
             <ad:value xsi:type="xsd:string">
               CN=Sample User,CN=users,DC=fabrikam,DC=com
             </ad:value>
           </addata:distinguishedName>
           <addata:codePage LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:codePage>
           <addata:name LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">Sample User</ad:value>
           </addata:name>
           <addata:whenChanged LdapSyntax="GeneralizedTimeString">
             <ad:value xsi:type="xsd:string">20080806180821.0Z</ad:value>
           </addata:whenChanged>
           <addata:badPasswordTime LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:badPasswordTime>
           <addata:lastLogoff LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:lastLogoff>
           <addata:countryCode LdapSyntax="Integer">
             <ad:value xsi:type="xsd:string">0</ad:value>
           </addata:countryCode>
           <addata:cn LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">Sample User</ad:value>
           </addata:cn>
           <addata:whenCreated LdapSyntax="GeneralizedTimeString">
             <ad:value xsi:type="xsd:string">20080806180821.0Z</ad:value>
           </addata:whenCreated>
           <addata:objectSid LdapSyntax="SidString">
             <ad:value xsi:type="xsd:base64Binary">
               AQUAAAAAA,AUVAAAAmQa9c3c0W2VqP7D2ZQYAAA==
             </ad:value>
           </addata:objectSid>
           <addata:objectGUID LdapSyntax="OctetString">
             <ad:value xsi:type="xsd:base64Binary">
               3MRkkoc1fUWGwM12sub3pw==
             </ad:value>
           </addata:objectGUID>
           <addata:objectCategory LdapSyntax="DSDNString">
             <ad:value xsi:type="xsd:string">
               CN=Person,CN=Schema,CN=Configuration,DC=fabrikam,DC=com
             </ad:value>
           </addata:objectCategory>
           <addata:uSNCreated LdapSyntax="LargeInteger">
             <ad:value xsi:type="xsd:string">17189</ad:value>
           </addata:uSNCreated>
           <ad:container-hierarchy-parent>
             <ad:value xsi:type="xsd:string">
               2bc4e0c4-b8c9-4eba-8c9e-1f9ea52c8d7e
             </ad:value>
           </ad:container-hierarchy-parent>
           <ad:relativeDistinguishedName>
             <ad:value xsi:type="xsd:string">CN=Sample User</ad:value>
           </ad:relativeDistinguishedName>
           <ad:distinguishedName>
             <ad:value xsi:type="xsd:string">
               CN=Sample User,CN=Users,DC=fabrikam,DC=com
             </ad:value>
           </ad:distinguishedName>
         </addata:user>
       </PartialAttribute>
     </BaseObjectSearchResponse>
   </soapenv:Body>
 </soapenv:Envelope>