Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the Windows identity of the current user.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
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.