SharePoint file operations M365-SharePointFileOperation

6 operations, identified by Operation in the audit log.

OperationDescription
_catch_allCatch-all for M365-SharePointFileOperation rules matching the RecordType but no specific Operation.
FileAccessedA user or application accessed (previewed or opened) a file in SharePoint Online or OneDrive without downloading it.
FileDownloadedA file was downloaded from SharePoint Online or OneDrive to the user's local device.
FileMalwareDetectedSharePoint or OneDrive antivirus scanning detected malware in an uploaded or synced file.
FileUploadedA file was uploaded to SharePoint Online or OneDrive.
SearchQueryPerformedA user or system account performed a search in SharePoint or OneDrive (listed under SharePoint file and page activities).

_catch_all: SharePoint file operations (catch-all)

#
RecordType
M365-SharePointFileOperation

Description

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

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

References #

FileAccessed

#
RecordType
M365-SharePointFileOperation

Description

A user or application accessed (previewed or opened) a file in SharePoint Online or OneDrive without downloading it.

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

Common Indicators #

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

FieldKindValueRulesVendors
OperationeqFileUploaded1 rulekusto
Provider_NameinOneDrive1 ruleelastic
Provider_NameinSharePoint1 ruleelastic
RecordTypeeqSharePointFileOperation1 rulekusto
SubjectUserNameeqanonymous1 rulechronicle
SubjectUserNameregex_match^urn:spo:anon#1 rulechronicle
TimeDeletedgtTimeAdded1 rulekusto
m365::WorkloadeqMicrosoftTeams1 rulekusto

Detection Rules #

View all rules referencing this event →

Elastic #

  • M365 SharePoint/OneDrive File Access via PowerShell source medium: Identifies file downloads or access from OneDrive or SharePoint using PowerShell-based user agents. Adversaries may use native PowerShell cmdlets like Invoke-WebRequest or Invoke-RestMethod with Microsoft Graph API to exfiltrate data after compromising OAuth tokens via device code phishing or other credential theft techniques. This rule detects both direct PowerShell access and PnP PowerShell module usage for file operations. FileAccessed events are included to detect adversaries reading file content via API and saving locally, bypassing traditional download methods. Normal users access SharePoint/OneDrive via browsers or sync clients, making PowerShell-based file access inherently suspicious.↳ also matches FileDownloaded

Kusto #

  • Accessed files shared by temporary external user source low: This detection identifies when an external user is added to a Team or Teams chat and shares a file which is accessed by many users (>10) and the users is removed within short period of time. This might be an indicator of suspicious activity.↳ also matches FileUploaded

YARA-L #

  • O365 OneDrive Anonymous File Accessed source: Anonymous links can be used to export files from OneDrive. While this isn't always a sign of malicious activity, some organizations do not support the use of anonymous links because of the risk of data leakage. This rule detects when anonymous links are used to access files from OneDrive.

References #

FileDownloaded

#
RecordType
M365-SharePointFileOperation

Description

A file was downloaded from SharePoint Online or OneDrive to the user's local device.

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

Common Indicators #

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

FieldKindValueRulesVendors
Deviationgt252 ruleskusto
OperationinFileDownloaded2 ruleskusto
OperationinFileUploaded2 ruleskusto
RecordTypeeqSharePointFileOperation2 ruleskusto
aws::userAgentis_not_null2 ruleselastic, kusto
EventTypeeqFileDownloaded1 ruleelastic, kusto
Provider_NameeqOneDrive1 ruleelastic
Provider_NameinOneDrive1 ruleelastic
Provider_NameinSharePoint1 ruleelastic
SubjectUserNameeqanonymous1 rulechronicle
SubjectUserNameregex_match^urn:spo:anon#1 rulechronicle
m365::ApplicationIdis_not_null1 ruleelastic
m365::WorkloadeqSharePoint1 rulekusto
network.http.methodeqGET1 rulechronicle
user.idis_not_null1 ruleelastic

Detection Rules #

View all rules referencing this event →

Elastic #

  • M365 OneDrive/SharePoint Excessive File Downloads source medium: Identifies when an excessive number of files are downloaded from OneDrive or SharePoint by an authorized user or application in a short period of time. This may indicate a potential data exfiltration event, especially if the downloads are performed using OAuth authentication which could suggest an OAuth phishing attack such as Device Code Authentication phishing.
  • M365 SharePoint/OneDrive File Access via PowerShell source medium: Identifies file downloads or access from OneDrive or SharePoint using PowerShell-based user agents. Adversaries may use native PowerShell cmdlets like Invoke-WebRequest or Invoke-RestMethod with Microsoft Graph API to exfiltrate data after compromising OAuth tokens via device code phishing or other credential theft techniques. This rule detects both direct PowerShell access and PnP PowerShell module usage for file operations. FileAccessed events are included to detect adversaries reading file content via API and saving locally, bypassing traditional download methods. Normal users access SharePoint/OneDrive via browsers or sync clients, making PowerShell-based file access inherently suspicious.↳ also matches FileAccessed

Kusto #

YARA-L #

References #

FileMalwareDetected

#
RecordType
M365-SharePointFileOperation

Description

SharePoint or OneDrive antivirus scanning detected malware in an uploaded or synced file.

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

Common Indicators #

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

FieldKindValueRulesVendors
EventTypeeqFileMalwareDetected2 ruleselastic
Provider_NameeqOneDrive1 ruleelastic
Provider_NameeqSharePoint1 ruleelastic

Detection Rules #

View all rules referencing this event →

Elastic #

  • M365 OneDrive Malware File Upload source high: Identifies the occurrence of files uploaded to OneDrive being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries an opportunity to gain initial access to other endpoints in the environment.
  • M365 SharePoint Malware File Detected source high: Identifies the occurrence of files uploaded to SharePoint being detected as Malware by the file scanning engine. Attackers can use File Sharing and Organization Repositories to spread laterally within the company and amplify their access. Users can inadvertently share these files without knowing their maliciousness, giving adversaries opportunities to gain initial access to other endpoints in the environment.

References #

FileUploaded

#
RecordType
M365-SharePointFileOperation

Description

A file was uploaded to SharePoint Online or OneDrive.

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

Common Indicators #

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

FieldKindValueRulesVendors
OperationeqFileUploaded3 ruleskusto
OperationinFileDownloaded2 ruleskusto
OperationinFileUploaded2 ruleskusto
RecordTypeeqSharePointFileOperation3 ruleskusto
Deviationgt252 ruleskusto
aws::userAgentis_not_null2 ruleselastic, kusto
TimeDeletedgtTimeAdded1 rulekusto
m365::WorkloadeqMicrosoftTeams1 rulekusto
m365::WorkloadeqSharePoint1 rulekusto

Detection Rules #

View all rules referencing this event →

Kusto #

  • New executable via Office FileUploaded Operation source low: Identifies when executable file types are uploaded to Office services such as SharePoint and OneDrive. List currently includes 'exe', 'inf', 'gzip', 'cmd', 'bat' file extensions. Additionally, identifies when a given user is uploading these files to another users workspace. This may be indication of a staging location for malware or other malicious activity.
  • Dataverse - Executable uploaded to SharePoint document management site source low: Identifies executable files and scripts uploaded to SharePoint sites used for Dynamics document management, circumventing native file extension restrictions in Dataverse.
  • Accessed files shared by temporary external user source low: This detection identifies when an external user is added to a Team or Teams chat and shares a file which is accessed by many users (>10) and the users is removed within short period of time. This might be an indicator of suspicious activity.↳ also matches FileAccessed
Show 2 more (5 total)

References #

SearchQueryPerformed

#
RecordType
M365-SharePointFileOperation

Description

A user or system account performed a search in SharePoint or OneDrive (listed under SharePoint file and page activities).

Fields #

NameDescription
RecordTypeAuditLogRecordType enum value (named string in Sentinel OfficeActivity; integer in the raw Management Activity API JSON).
OperationThe name of the user or admin activity. For Exchange admin activity this is the cmdlet name; for DLP it is DlpRuleMatch/DlpRuleUndo/DlpInfo. The per-event discriminator (event.action in Elastic ECS).
WorkloadThe Microsoft 365 service where the activity occurred (Exchange, SharePoint, AzureActiveDirectory, MicrosoftTeams, ...). Surfaces as event.provider in Elastic ECS.
ResultStatusWhether the action succeeded: Succeeded, PartiallySucceeded, or Failed (True/False for Exchange admin). For STS-logon events this reflects only the HTTP operation, not logon success: check LogonError.
UserIdUPN of the user who performed the action; system-account and app@sharepoint values also appear.
UserTypeType of actor: Regular, Admin, System, DcAdmin, Application, ServicePrincipal.
UserKeyAlternative ID for the user (the PUID for SharePoint / OneDrive / Exchange events).
ClientIPIPv4/IPv6 address of the device used; may be a trusted-app IP, and is null for Microsoft Entra ID events.
ObjectIdFor SharePoint/OneDrive, the full path of the file/folder; for Exchange admin, the object modified by the cmdlet; shape is operation-specific.
OrganizationIdGUID of the tenant's Office 365 organization (constant per tenant).
IdUnique identifier (GUID) for the audit record.
CreationTimeUTC date/time when the audit record was generated.
ScopeSource of the event: online (a Microsoft 365 service) or onprem (an on-premises service; currently SharePoint only).
AppAccessContextApplication context for the user or service principal that performed the action.
ItemTypeThe type of object accessed or modified (File, Folder, List, Site, ...).
EventSourceIdentifies a SharePoint event: SharePoint or ObjectModel.
SiteUrlURL of the site where the file or folder is located.
SourceRelativeUrlURL of the folder containing the file; SiteUrl + SourceRelativeUrl + SourceFileName equals the full ObjectId path.
SourceFileNameName of the file or folder accessed by the user.
SourceFileExtensionFile extension of the accessed file (blank for folders).
DestinationFileNameName of the file copied or moved (FileCopied / FileMoved events).
UserSharedWithThe user a resource was shared with (sharing operations).
SharingTypeThe permission level assigned to the user the resource was shared with.
UserAgentClient or browser information reported by the client.
MachineIdDevice information for device-sync operations (when present in the request).
ApplicationIdID of the application performing the operation.
ListIdGUID of the SharePoint list (when applicable).

Common Indicators #

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

FieldKindValueRulesVendors
Provider_NameeqSharePoint1 ruleelastic

Detection Rules #

View all rules referencing this event →

Elastic #

  • M365 SharePoint Search for Sensitive Content source low: Identifies search queries in SharePoint containing sensitive terms related to credentials, financial data, PII, legal matters, or infrastructure information. Adversaries who compromise user accounts often search for high-value files before exfiltration. This rule detects searches containing terms across multiple sensitivity categories, regardless of the access method (browser, PowerShell, or API). The actual search query text is analyzed against a curated list of sensitive terms to identify potential reconnaissance activity.

References #