SharePoint and OneDrive search activity

OperationDescriptionSampleRule
anyCatch-all for M365-SharePointSearch rules matching the RecordType but no specific Operation.NN
SearchQueryInitiatedSharePointA user performed a search in SharePoint Online or OneDrive; an Audit (Premium) event capturing the query (real UAL sample: Operation SearchQueryInitiatedSharePoint, RecordType 102, Workload SharePoint).YY

any: SharePoint and OneDrive search activity (catch-all)

#
RecordType
SharePointSearch

Description

Catch-all for M365-SharePointSearch rules matching the RecordType but no specific Operation.

References #

SearchQueryInitiatedSharePoint

#
RecordType
SharePointSearch

Description

A user performed a search in SharePoint Online or OneDrive; an Audit (Premium) event capturing the query (real UAL sample: Operation SearchQueryInitiatedSharePoint, RecordType 102, Workload SharePoint).

Example Audit Record #

{
  "QuerySource": "SharePoint",
  "QueryText": "passwords",
  "ScenarioName": "teamsitesearch",
  "ClientUserAgent": "Mozilla/5.0,(Windows NT 10.0; Win64; x64),AppleWebKit/537.36,(KHTML, like Gecko),Chrome/133.0.0.0,Safari/537.36",
  "CustomProperties": [
    {
      "Name": "UserAgent",
      "Value": "sharepointshared.teamsitesearch"
    }
  ],
  "UserId": "attacker_3@attackrange.local",
  "ClientIP": "174.97.106.111",
  "Id": "f87a9c11-9f72-4e7f-a713-a840dce08b15",
  "RecordType": 102,
  "CreationTime": "2025-02-25T13:55:06",
  "Operation": "SearchQueryInitiatedSharePoint",
  "OrganizationId": "6915b1e0-b081-4829-8866-f1a3e883a9ae",
  "UserType": 0,
  "UserKey": "10037FFE8C9C6D32",
  "Workload": "SharePoint",
  "AppAccessContext": {
    "APIId": "00000003-0000-0ff1-ce00-000000000000",
    "ClientAppId": "00000003-0000-0ff1-ce00-000000000000"
  },
  "Version": 1
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
command (splunk rule field)ne(*)1 rulesplunk
command (splunk rule field)ne*1 rulesplunk
count (splunk rule field)gt201 rulesplunk
suspect_terms_count (splunk rule field)ge21 rulesplunk

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Splunk #

References #

M365 audit records use different field names on each surface #

The same Unified Audit Log record uses different field names on each surface. A query built for one surface can silently miss on another. These pages document the Management Activity API JSON names, the same names Search-UnifiedAuditLog and the Office 365 Management Activity API return.

  • Purview CSV export flattens each record to four columns (CreationDate, UserIds, Operations, AuditData). The API field names live only inside the AuditData JSON blob. Expand it with ConvertFrom-Json. The wrapper columns are renamed too: CreationDate not CreationTime, UserIds not UserId, Operations not Operation.
  • Sentinel's OfficeActivity table renames several fields and turns two integer enum columns into strings. The table below maps them.
API JSON (event pages)OfficeActivity columnNote
IdOfficeIdRenamed.
WorkloadOfficeWorkloadRenamed.
ObjectIdOfficeObjectIdRenamed.
CreationTimeTimeGeneratedRenamed. OfficeActivity has no CreationTime column.
SiteUrlSite_UrlRenamed (SharePoint family).
RecordTypeRecordTypeSame name; the Int32 enum becomes its string enum name.
UserTypeUserTypeSame name; the Int32 enum becomes a string.
ClientIPClientIP, Client_IPAddressBoth columns present on OfficeActivity.
Scope(none)No OfficeActivity equivalent under any name. Recover it from the API JSON or the Purview AuditData blob.
Operation, UserId, ResultStatus, UserKey, AppAccessContext, OrganizationIdsame namesUnchanged. No _s / _d suffixes (a native table, not a custom log).

Mapping verified against the OfficeActivity table reference, the Management Activity API schema, and the Purview audit-record export format.