Web.CurrentUser property

Gets the current user of the site.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

public User CurrentUser { get; }

Property value

Type: Microsoft.SharePoint.Client.User
A User object that represents the current user.

It must not be a null reference (Nothing in Visual Basic).

Show: