3.1.1.13.6 GetUserLogonInfoByAttribute
-
procedure GetUserLogonInfoByAttribute( SearchKey: unicodestring, Attribute: ATTRTYP, ExpandedSids: ARRAY(SID), MaxValidityTimeHint: LARGE_INTEGER) : NTSTATUS
SearchKey: The principal whose logon information is to be retrieved.
Attribute: The attribute to use when searching for the principal.
ExpandedSids: Returns the set of expanded SIDs.
MaxValidityTimeHint: Returns a future timestamp that specifies when the returned results are no longer considered valid; a value of zero signifies that no hint is being returned.
Return Values: This procedure returns STATUS_SUCCESS ([MS-ERREF] section 2.3.1) to indicate success; otherwise, an NTSTATUS error code.
Note This procedure uses the pseudocode language defined in [MS-DRSR] section 3.4, and other functions defined in [MS-DRSR] section 4.1.4.2.
Logical Processing:
-
Status: NTSTATUS; Names: set of DSName /* Look for user account */ Names := LookupAttr(0, Attribute, SearchKey) if Names == null return STATUS_NO_SUCH_USER endif /* Ensure uniqueness */ if number(Names) != 1 return STATUS_NO_SUCH_USER endif Status = GetUserLogonInfo( Names[0], ExpandedSids, MaxValidityTimeHint); return Status;