SPSecurityContext.GetWindowsIdentity method
Returns the Windows identity of the current user.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetWindowsIdentity As WindowsIdentity
'Usage
Dim returnValue As WindowsIdentity
returnValue = SPSecurityContext.GetWindowsIdentity()
public static WindowsIdentity GetWindowsIdentity()
Return value
Type: System.Security.Principal.WindowsIdentity
An object that represents a Windows user.
Remarks
You can access the IsWindowsIdentityAvailable property to determine if an identity is available for the current user before calling the GetWindowsIdentity method.