3.1.6.14 Get Object Properties Using LDAP

This event MUST be generated with the following arguments:

  • iPath: the distinguished name of the object; optional if iGuid is supplied.

  • iGuid: the value of the objectGuid attribute of the object; optional if iPath is supplied.

  • iAttributes: a list of attribute names.

Return Values:

  • rStatus: A DirectoryOperationResult that indicates the result of this directory operation.

  • rValues: if rStatus is Success, the values of the attributes listed in iAttributes, in the same order. Otherwise, this value is undefined and MUST NOT be used.

The algorithm MUST perform the following actions to process this event:

  • If the value of the CachedConfigurationNamingContext ADM element is an empty string, rStatus MUST be set to DirectoryOperationResult.DirectoryNotConnected, and processing MUST end.

  • If the iAttributes list does not contain the attribute name "objectGuid", add it to the list. If the iAttributes list does not contain the attribute name "distinguishedName", add it to the list.

  • Raise a Prepare an LDAP Connection (section 3.1.6.18) event. The event takes no arguments. If the rStatus returned is not DirectoryOperationResult.Success, rStatus MUST be set to DirectoryOperationResult.DirectoryNotConnected, and processing MUST end. Otherwise, let DirectoryServerConnection be a variable of type ADCONNECTION_HANDLE ([MS-DTYP] section 2.2.2), which is initialized to the value returned in rADConnection.

  • If iGuid is supplied, perform the following steps:

    • Raise a Find Object By GUID Using LDAP (section 3.1.6.19) event with the following arguments:

      • iGuid = iGuid

      • iADConnection = DirectoryServerConnection

    • If the value of rStatus returned by the event is not DirectoryOperationResult.Success, rStatus MUST be set to the value of rStatus returned by the event, and processing MUST end.

    • Set iPath to the value of rDN.

  • Construct an LDAPMessage ([RFC2251] section 4.1):

    • messageID = set as described in [RFC2251] section 4.1.1.1.

    • protocolOp = searchRequest

    • controls = none

    • baseObject = iPath

    • scope = baseObject

    • derefAliases = neverDerefAliases

    • sizeLimit = 0

    • timeLimit = 0

    • typesOnly = FALSE

    • filter = "(objectClass=*)"

    • attributes = an empty list

  • Perform the Performing an LDAP Operation on an ADConnection ([MS-ADTS] section 7.6.1.6) task with the following parameters:

    • TaskInputADConnection = DirectoryServerConnection

    • TaskInputRequestMessage = the LDAPMessage constructed in the preceding step

  • If the value of TaskReturnStatus is not success, as defined in [RFC2251] section 4.1.10, the algorithm MUST perform the following steps:

  • For each attribute name in iAttributes, extract the value for that attribute from the result message returned in TaskOutputResultMessages and add it to the rValues list. If there is no matching value in the results, add an empty entry to the rValues list.

  • Raise a Shut Down an LDAP Connection event.

  • Processing MUST end.