Share via


SPAuditEntry.UserId property

Gets the ID of the user who caused the event.

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

Syntax

'Declaration
Public ReadOnly Property UserId As Integer
    Get
'Usage
Dim instance As SPAuditEntry
Dim value As Integer

value = instance.UserId
public int UserId { get; }

Property value

Type: System.Int32
An Int32 that represents the user's ID from the SharePoint user's database.

Remarks

If the value of EventSource is ObjectModel, then UserId holds the ID of the user in whose context the code that caused the event was running. If the user context was the system account, UserId returns -1.

See also

Reference

SPAuditEntry class

SPAuditEntry members

Microsoft.SharePoint namespace