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)
Available in Sandboxed Solutions: No

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