GetSecurityUserInfo function

The GetSecurityUserInfo function retrieves information about a logon session.

Syntax

NTSTATUS GetSecurityUserInfo(
  _In_opt_ PLUID             LogonId,
  _In_     ULONG             Flags,
  _Out_    PSecurityUserData *UserInformation
);

Parameters

  • LogonId [in, optional]
    An optional pointer to an LUID containing the logon session for which information is to be retrieved. If LogonId is NULL, information for the logon session of the calling thread is returned.

  • Flags [in]
    This parameter is currently not used.

  • UserInformation [out]
    A pointer to a location which contains a pointer to a SecurityUserData structure. If the function call succeeds, the user information is returned in this structure. The caller is responsible for freeing this buffer by calling the [LsaFreeReturnBufferhttps://go.microsoft.com/fwlink/p/?linkid=121239) function.

Return value

GetSecurityUserInfo returns an appropriate NTSTATUS value, such as one of the following.

Return code Description
STATUS_SUCCESS

The SecurityUserData structure, indirectly pointed to by UserInformation, contains the requested user information.

STATUS_NO_SUCH_LOGON_SESSION

Indicates that the specified logon session does not exist.

 

Remarks

This function obtains information about a logon session via the [SecurityUserDatahttps://go.microsoft.com/fwlink/p/?linkid=121238) structure.

Requirements

Target platform

Universal

Version

Available in Microsoft Windows 2000 and later.

Header

Ntifs.h (include Ntifs.h or FltKernel.h)

Library

Ksecdd.lib

IRQL

PASSIVE_LEVEL

See also

LsaFreeReturnBuffer

MapSecurityError

 

 

Send comments about this topic to Microsoft