1. Resources
  2. Detection rules
  3. Files Downloaded in Bulk From SharePoint or OneDrive by One Account

Files Downloaded in Bulk From SharePoint or OneDrive by One Account detection rules

An attacker who controls an account, or an insider, downloads many files from SharePoint sites and OneDrive in a short time. Every file the account can read is within reach, and each download is written to the unified audit log.

Platform
Microsoft 365
Severity
Medium
Log source
Microsoft 365 unified audit log (SharePoint and OneDrive)
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft Sentinel
What an attacker needs
Control of an account or application that can read the files, through a stolen password, session or consent, and devices or networks that allow downloads.
Impact
A copy of every file the account could read, taken outside the organization without the file owners being told.
Response
Revoke the account's sessions and credentials, list the downloaded files from the audit log and let the data owners decide what counts as disclosed.
Mitigation
Require phishing-resistant MFA and managed devices for SharePoint and OneDrive, and limit downloads from unmanaged devices.
Operation
FileDownloaded

How the attack works

SharePoint and OneDrive hold the working documents of an organization, and an account can download every file it has permission to read. An attacker who has taken over an account, through a stolen password, a stolen session or a consented application, does not need to raise any privilege to take a copy of that content. They open the sites and libraries the account can reach and download what they find, often far more files in an hour than the account's owner touches in a month. The same pattern is what an employee who leaves with the company's files produces.

The unified audit log records each download. Microsoft documents FileDownloaded for a document downloaded from a site, with the full path of the file in ObjectId and the account in UserId, and FileSyncDownloadedFull for a file downloaded to a computer by the OneDrive sync app. Microsoft Defender for Cloud Apps ships a policy template named Mass download by a single user and an anomaly detection for unusual multiple file download activities, which shows that the volume per account is the signal. The rule on this page counts the different files one account downloads in a browser or through an application within an hour. Downloads by the sync app are left to the detection logic, because the first sync of a library on a new computer legitimately downloads thousands of files.

What an attacker needs

  • Control of an account that can read the files, for example through a stolen password or session, or an application the user consented to that holds file permissions.
  • Network and device conditions that allow the download. Policies that block downloads on unmanaged devices or outside trusted networks stop part of it.

Impact

A copy of every file the account could read, taken outside the organization: contracts, financial data, customer records, designs and the credentials that people keep in documents. The owners of the files are not told, and the copy cannot be recalled.

Detection rules

One Account Downloaded Many Files From SharePoint or OneDrive

Counts, per account (UserId), the different files downloaded from SharePoint sites and OneDrive (FileDownloaded, counted by ObjectId, which Microsoft documents as the full path of the file). An account that is used to take a copy of what it can read downloads far more different files in an hour than its owner does in ordinary work. The rule fires at 100 or more different files for one account within one hour. Microsoft Defender for Cloud Apps uses the same idea in its policy template Mass download by a single user. Downloads by the OneDrive sync app are written as FileSyncDownloadedFull and are not counted here. The count and the window are starting points to tune.

Fires when one UserId has at least 100 different ObjectId values within 1 hour.

Threshold ruleLevelMediumStatusExperimentalLog sourceMicrosoft 365 unified audit log (SharePoint and OneDrive)
title: SharePoint or OneDrive File Downloaded (Bulk Download Base Event)
id: 9f4500df-761a-487e-9765-6789723acde8
name: m365_sharepoint_file_downloaded
status: experimental
description: >-
  Base event of the threshold rule in this file. The unified audit log
  operation FileDownloaded, which Microsoft documents as a user downloading
  a document from a site.
logsource:
  product: m365
  service: sharepoint
detection:
  selection:
    Operation: FileDownloaded
  condition: selection
level: low
---
title: One Account Downloaded Many Files From SharePoint or OneDrive
id: 507a01b2-65ce-40ce-9467-90defee678f2
status: experimental
description: >-
  Counts, per account (UserId), the different files downloaded from
  SharePoint sites and OneDrive (FileDownloaded, counted by ObjectId, which
  Microsoft documents as the full path of the file). An account that is
  used to take a copy of what it can read downloads far more different
  files in an hour than its owner does in ordinary work. The rule fires at
  100 or more different files for one account within one hour. Microsoft
  Defender for Cloud Apps uses the same idea in its policy template Mass
  download by a single user. Downloads by the OneDrive sync app are written
  as FileSyncDownloadedFull and are not counted here. The count and the
  window are starting points to tune.
references:
  - https://learn.microsoft.com/en-us/purview/audit-log-activities#file-and-page-activities
  - https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema#common-schema
  - https://learn.microsoft.com/en-us/defender-cloud-apps/protect-office-365
  - https://attack.mitre.org/techniques/T1530/
author: Forestall
date: 2026-11-18
tags:
  - attack.collection
  - attack.t1530
  - attack.t1213.002
correlation:
  type: value_count
  rules:
    - m365_sharepoint_file_downloaded
  group-by:
    - UserId
  timespan: 1h
  condition:
    field: ObjectId
    gte: 100
falsepositives:
  - Migrations, backups, audits and handovers in which one person or one service account downloads a whole library. Confirm the work and exclude service accounts by UserId.
  - Users who select many files in a library and download them together. Each file writes its own record.
  - The values of 100 files and one hour are starting points, not tested limits. An attacker who downloads slowly stays below the count.
level: medium

False positives

  • Migrations, backups, audits and handovers in which one person or one service account downloads a whole library. Confirm the work and exclude service accounts by UserId.
  • Users who select many files in a library and download them together. Each file writes its own record.
  • The values of 100 files and one hour are starting points, not tested limits. An attacker who downloads slowly stays below the count.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

OneDrive sync app downloads many files to an address the account never used

Detection hypothesisNeeds a baselineJoins two logs

The sync app is a quiet way to copy whole libraries, because one sync downloads everything at once and needs no clicks. A first sync on a new company laptop happens from the company's networks or the user's home. A large sync from an address the account has never used before, or right after a risky sign-in, is the sync client used to take the content.

  1. Unified audit log, SharePoint and OneDrive records: FileSyncDownloadedFull. Count the different ObjectId values per UserId and ClientIP per hour.
  2. Build the list of ClientIP values each account used in its SharePoint, OneDrive and Microsoft Entra sign-in records (IPAddress) over the 30 days before.
  3. Alert when one account syncs more than a starting value of 500 files in an hour from an address that is not on its list, and raise the priority when the sign-in from that address had RiskLevelDuringSignIn medium or high.

EventsFileSyncDownloadedFull

LimitsA new laptop set up at home or while travelling syncs from a new address. Microsoft notes that ClientIP can be the address of a trusted Microsoft application acting for the user. RiskLevelDuringSignIn is hidden without Microsoft Entra ID P2. The 30 days and the count are starting points.

Triage

  • Read UserId for the account, and the paths in ObjectId and SiteUrl for what was taken. A spread over many sites, or a site the account never used, needs an explanation.
  • Compare ClientIP and UserAgent of the downloads with the account's usual addresses and clients.
  • Review the account's sign-ins before the downloads for a new location, device or risk level, and for sign-ins through an application.
  • Ask the account's owner and manager whether the download was work, for example a migration, an audit or a handover.
  • If the account belongs to someone who is leaving the organization, involve the people responsible for insider risk.

Response

Once the attack is confirmed:

  1. Revoke the account's sessions, reset its credentials and review its MFA methods if the account was taken over.
  2. If an application did the downloads, revoke its consent and remove its credentials.
  3. List the files that were downloaded from ObjectId and hand the list to the owners of the data, who decide whether the content counts as disclosed.
  4. Rotate any secret or credential found in the downloaded files.
  5. Look for sharing links the account created in the same period and remove them.

Mitigation

  • Require phishing-resistant MFA and compliant or hybrid-joined devices for SharePoint and OneDrive with Conditional Access, so that a stolen password or a personal device is not enough.
  • Limit or block downloads from unmanaged devices with the SharePoint and OneDrive unmanaged device access controls, and keep Anyone links disabled where those controls apply.
  • Allow the OneDrive sync app only on computers in your own domains.
  • Review site permissions and broad sharing groups such as Everyone except external users, so that one account does not reach more than it needs.
  • Send the SharePoint and OneDrive records of the unified audit log to your SIEM.

Frequently asked questions

Why does the rule count files and not download events?

An account that opens the same document several times writes several FileDownloaded records for one file. The rule counts the different values of ObjectId, which Microsoft documents as the full path of the file, so it measures how much content left and not how often one file was opened.

Are files synced with the OneDrive sync app counted?

Not by the rule. Microsoft records those as FileSyncDownloadedFull, and the first sync of a library on a new computer downloads every file in it, which would make the rule fire for every new laptop. The detection logic on this page looks at sync downloads from addresses the account never used instead.

Does the rule see an application that downloads files for a user?

Possibly, but check it in your own data first. Microsoft Defender for Cloud Apps describes a detection for OAuth apps that download multiple files from SharePoint or OneDrive in a manner that is unusual for the user, so applications acting for a user produce the same pattern. The rule counts by UserId, and Microsoft does not state under which account such downloads are recorded.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.