How the attack works
Every SharePoint site and every OneDrive is a site collection, and a site collection administrator has full control of it and of all its subsites. For a OneDrive that means every file of the user, whatever the user shared or kept private. Adding an account to the site collection administrators is a supported administrative action. Microsoft documents it for handing a former employee's OneDrive to a colleague, in the user profile settings of the SharePoint admin center under "Manage site collection owners", and the Microsoft 365 admin center lets an administrator create a link to a user's files, which gives the administrator access.
The same action serves an attacker who has taken over an account with SharePoint administration rights. They add themselves, or an account they control, to the OneDrive of an executive or to a site that holds the documents they want, and then read, download or share the content as any owner could. The user is not asked and nothing in the site shows the change unless somebody opens its permission settings.
The unified audit log records the action as SiteCollectionAdminAdded. Microsoft states that the activity is also logged when an admin gives themselves access to a user's OneDrive account. A user who asks to become site collection administrator writes SiteAdminChangeRequest. For admin events of this kind the record includes ModifiedProperties, with the name of the property that changed, for example the Site Admin group, and the new value, such as the user who was added.
What an attacker needs
- An account with SharePoint administration rights in the tenant, such as SharePoint Administrator or Global Administrator.
- Or an account that is already site collection administrator or owner of the site, which can add others.
Impact
Full control of the site collection or of the user's OneDrive: reading and downloading every file, changing and deleting content, and sharing it with others. For a OneDrive this is the user's working documents, including what they never shared with anybody.
Detection rules
Site Collection Administrator Added or Requested for a SharePoint Site
Detects the unified audit log operations SiteCollectionAdminAdded and SiteAdminChangeRequest for any site. Microsoft documents the first as a site collection administrator or owner adding a person as a site collection administrator for a site, and the second as a user requesting to be added as a site collection administrator for a site collection. Site collection administrators have full control permissions for the site collection and all subsites. The rule is rated low because sites get administrators in ordinary work. Events for a OneDrive also match the more specific rule of this page. The account that made the change is in UserId, the site in ObjectId or SiteUrl and the account that was added in ModifiedProperties.
title: Site Collection Administrator Added or Requested for a SharePoint Site
id: 878f3e11-efc5-4e53-b87a-f7cb467c8861
status: experimental
description: >-
Detects the unified audit log operations SiteCollectionAdminAdded and
SiteAdminChangeRequest for any site. Microsoft documents the first as a
site collection administrator or owner adding a person as a site collection
administrator for a site, and the second as a user requesting to be added
as a site collection administrator for a site collection. Site collection
administrators have full control permissions for the site collection and
all subsites. The rule is rated low because sites get administrators in
ordinary work. Events for a OneDrive also match the more specific rule of
this page. The account that made the change is in UserId, the site in
ObjectId or SiteUrl and the account that was added in ModifiedProperties.
references:
- https://learn.microsoft.com/en-us/purview/audit-log-activities
- https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: m365
service: sharepoint
detection:
selection:
Operation:
- SiteCollectionAdminAdded
- SiteAdminChangeRequest
condition: selection
falsepositives:
- New sites and teams. Microsoft explains that an application sets up the site collection and its membership when a Microsoft 365 group or a team is created, with app@sharepoint as the user. Filter those events by UserId if your tenant writes them with this operation.
- Site owners and SharePoint administrators who add a second administrator to a site. Keep a list of your sensitive sites and alert on those.
level: low
False positives
- New sites and teams. Microsoft explains that an application sets up the site collection and its membership when a Microsoft 365 group or a team is created, with app@sharepoint as the user. Filter those events by UserId if your tenant writes them with this operation.
- Site owners and SharePoint administrators who add a second administrator to a site. Keep a list of your sensitive sites and alert on those.
Site Collection Administrator Added to a User's OneDrive
Detects the unified audit log operation SiteCollectionAdminAdded for a OneDrive. Microsoft documents that the operation is written when a site collection administrator or owner adds a person as a site collection administrator, that site collection administrators have full control permissions for the site collection and all subsites, and that the activity is also logged when an admin gives themselves access to a user's OneDrive account. A OneDrive is recognized by its address under the tenant's -my.sharepoint.com host in the personal path, the pattern Microsoft uses in its own PowerShell example to select the OneDrive of every user. Microsoft does not state which field of this record carries the address, so the rule accepts it in ObjectId or in SiteUrl. The account that made the change is in UserId and the account that was added in ModifiedProperties.
title: Site Collection Administrator Added to a User's OneDrive
id: b3535b72-ca3f-4223-80d0-17a07e739209
status: experimental
description: >-
Detects the unified audit log operation SiteCollectionAdminAdded for a
OneDrive. Microsoft documents that the operation is written when a site
collection administrator or owner adds a person as a site collection
administrator, that site collection administrators have full control
permissions for the site collection and all subsites, and that the activity
is also logged when an admin gives themselves access to a user's OneDrive
account. A OneDrive is recognized by its address under the tenant's
-my.sharepoint.com host in the personal path, the pattern Microsoft uses in
its own PowerShell example to select the OneDrive of every user. Microsoft
does not state which field of this record carries the address, so the rule
accepts it in ObjectId or in SiteUrl. The account that made the change is
in UserId and the account that was added in ModifiedProperties.
references:
- https://learn.microsoft.com/en-us/purview/audit-log-activities
- https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-schema
- https://learn.microsoft.com/en-us/sharepoint/manage-user-profiles
- https://learn.microsoft.com/en-us/sharepoint/control-access-from-unmanaged-devices
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: m365
service: sharepoint
detection:
selection_operation:
Operation: SiteCollectionAdminAdded
selection_onedrive_object:
ObjectId|contains: '-my.sharepoint.com/personal/'
selection_onedrive_site:
SiteUrl|contains: '-my.sharepoint.com/personal/'
condition: selection_operation and 1 of selection_onedrive_*
falsepositives:
- Offboarding, in which the files of a former employee are handed to a manager or a colleague, and administrators who recover files for a user. Match the event to the request behind it.
- If your tenant writes the operation when a OneDrive is first created for its owner, the added account is the owner of that OneDrive. Compare the two and ignore those events.
level: medium
False positives
- Offboarding, in which the files of a former employee are handed to a manager or a colleague, and administrators who recover files for a user. Match the event to the request behind it.
- If your tenant writes the operation when a OneDrive is first created for its owner, the added account is the owner of that OneDrive. Compare the two and ignore those events.
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.
Administrator added to a OneDrive, then many files accessed or downloaded by the added account
An offboarding hands a OneDrive to a manager who moves a few folders over days. An attacker who added their own account takes what they came for at once. Access and downloads by the newly added administrator in the first hours after the change separate the two.
- Unified audit log:
SiteCollectionAdminAddedfor an address under-my.sharepoint.com/personal/. Take the site fromObjectIdorSiteUrland the added account fromModifiedProperties. - Within 24 hours, in the same site:
FileAccessed,FileDownloadedorFileSyncDownloadedFullwhoseUserIdis the added account. - Count the files. Alert at 50 or more, and at any
AnonymousLinkCreatedby that account in the site.
EventsSiteCollectionAdminAddedFileAccessedFileDownloadedFileSyncDownloadedFullAnonymousLinkCreated
LimitsA colleague who takes over the files of a leaver may download a whole folder on the first day. Microsoft does not log FileAccessed again for the same user and file within five minutes, which lowers the count. The 24 hours and the 50 files are starting points.
Triage
- Read UserId for the account that made the change and the site in ObjectId or SiteUrl. A OneDrive has
-my.sharepoint.com/personal/in its address. - Read ModifiedProperties for the account that was added. An administrator who adds themselves needs a reason.
- When UserId is app@sharepoint, an application acted on behalf of a user or an admin. Microsoft explains that this happens, for example, when a Microsoft 365 group or a team is created. Read ApplicationDisplayName and EventData to see which.
- Ask for the request behind the change, such as an offboarding ticket or a legal hold.
- Look at what the added account did in the site afterwards, such as file access, downloads and new sharing links.
Response
Once the attack is confirmed:
- Remove the added account from the site collection administrators of the site or OneDrive.
- Review the audit log for what that account did there while it had access, such as
FileAccessed,FileDownloadedandFileSyncDownloadedFull, and for sharing links it created, and remove those links. - Revoke the sessions and reset the credentials of the administrator account that made the change, and remove its role until the takeover is understood.
- Tell the owner of the OneDrive or the site what was reachable, and treat it as disclosed.
- Search the audit log for the same operation by the same account on other sites.
Mitigation
- Keep the SharePoint Administrator and Global Administrator roles to a few accounts, and make them eligible through Privileged Identity Management instead of permanently active.
- Handle access to a former employee's OneDrive through a documented process with a named requester, and remove the access when the files are moved. Microsoft documents the removal next to the grant.
- Review the site collection administrators of sensitive sites and of executives' OneDrive accounts regularly.
- Send the SharePoint records of the unified audit log to your SIEM.
Frequently asked questions
Can a SharePoint administrator read any user's OneDrive?
Not without a change, but the change is theirs to make. Microsoft documents how an administrator adds an account to the site collection administrators of a user's OneDrive, which gives full control of it. The unified audit log records that as SiteCollectionAdminAdded, including when an admin gives themselves access.
Does the audit record say who was added as administrator?
Yes, in ModifiedProperties. Microsoft's schema states that the property is included for admin events such as adding a user to a site collection admin group, with the name of the property that was modified, for example the Site Admin group, and the new value, such as the user who was added as a site admin.
How do the rules tell a OneDrive from an ordinary site?
By the address. A OneDrive is a site under the tenant's -my.sharepoint.com host, in the personal path, and Microsoft uses that pattern in its own examples to select the OneDrive of every user. One rule on this page matches the operation only for such addresses and is rated higher. The other matches it for every site.
Why is the user in some of these records app@sharepoint?
Microsoft explains that app@sharepoint means an application performed the activity on behalf of a user, an admin or a service. It appears, for example, when a Microsoft 365 group or a team is created, because an application then creates the site collection and sets its membership. The ApplicationDisplayName and EventData fields help to identify the scenario.
References
- MITRE ATT&CK T1098.003: Account Manipulation, Additional Cloud Roles
- Microsoft Purview: Audit log activities (Site permissions activities, the app@sharepoint user)
- Office 365 Management Activity API schema (SharePoint schema, ModifiedProperties)
- Manage user profiles in the SharePoint admin center (add and remove admins for a user's OneDrive)
- Give another employee access to OneDrive and Outlook data
- SharePoint and OneDrive unmanaged device access controls (OneDrive address pattern in the PowerShell example)