How the attack works
Three organization-wide policies decide how far the files in SharePoint and OneDrive can travel. The sharing policy sets whether content can be shared outside the organization and with whom, from only people in the organization up to links that anyone can open without signing in. The unmanaged devices policy blocks or limits access from devices that are not joined to the organization. The location-based access policy, also called a trusted network boundary, blocks every attempt to reach SharePoint and OneDrive from outside the IP address ranges the organization listed. The organization-level sharing setting affects all SharePoint sites and each user's OneDrive.
An attacker who has taken over an account with SharePoint administration rights can change all three in the admin center or with PowerShell. Opening external sharing lets users share files and folders with people outside. Removing the device or location restriction lets a stolen identity open the files from the attacker's own machine and network. Nothing happens to the data at that moment, which is why the change is easy to miss.
The unified audit log records each change: SharingPolicyChanged for the sharing policy, DeviceAccessPolicyChanged for the unmanaged devices policy and NetworkAccessPolicyChanged for the location-based policy. For the sharing policy Microsoft states that any change to its settings is logged and that the policy that was changed is identified in ModifiedProperties. The operations are the same for a change that tightens a policy and one that loosens it, so the rules on this page fire for both and the event has to be read.
What an attacker needs
- An account with SharePoint administration rights. Microsoft describes all three changes as made by a SharePoint or global administrator.
Impact
The controls that keep files inside the organization, on managed devices or on its network are gone for every site and every OneDrive at once. What follows is quiet: sharing links for outsiders, or downloads by an account that would have been blocked the day before.
Detection rules
SharePoint Unmanaged Device or Network Location Access Policy Changed
Detects the unified audit log operations DeviceAccessPolicyChanged and NetworkAccessPolicyChanged. Microsoft documents the first as a SharePoint or global administrator changing the unmanaged devices policy of the organization, which controls access to SharePoint, OneDrive and Microsoft 365 from devices that are not joined to the organization. It documents the second as a change of the location-based access policy, also called a trusted network boundary, in the SharePoint admin center or with SharePoint PowerShell. That policy controls who can access SharePoint and OneDrive resources based on authorized IP address ranges. Microsoft documents the operations only, with no field that holds the new setting, so the rule fires for a change in either direction and the setting has to be compared in the admin center. The account is in UserId.
title: SharePoint Unmanaged Device or Network Location Access Policy Changed
id: f3da661b-347d-4db4-8419-73e696270297
status: experimental
description: >-
Detects the unified audit log operations DeviceAccessPolicyChanged and
NetworkAccessPolicyChanged. Microsoft documents the first as a SharePoint
or global administrator changing the unmanaged devices policy of the
organization, which controls access to SharePoint, OneDrive and Microsoft
365 from devices that are not joined to the organization. It documents the
second as a change of the location-based access policy, also called a
trusted network boundary, in the SharePoint admin center or with SharePoint
PowerShell. That policy controls who can access SharePoint and OneDrive
resources based on authorized IP address ranges. Microsoft documents the
operations only, with no field that holds the new setting, so the rule
fires for a change in either direction and the setting has to be compared
in the admin center. The account is in UserId.
references:
- https://learn.microsoft.com/en-us/purview/audit-log-activities
- https://learn.microsoft.com/en-us/sharepoint/control-access-from-unmanaged-devices
- https://learn.microsoft.com/en-us/sharepoint/control-access-based-on-network-location
- https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.t1484
logsource:
product: m365
service: sharepoint
detection:
selection:
Operation:
- DeviceAccessPolicyChanged
- NetworkAccessPolicyChanged
condition: selection
falsepositives:
- Planned changes by SharePoint administrators, such as a new office address range or the rollout of device restrictions. Both policies change rarely, so confirm each event with a change record.
level: medium
False positives
- Planned changes by SharePoint administrators, such as a new office address range or the rollout of device restrictions. Both policies change rarely, so confirm each event with a change record.
SharePoint Organization Sharing Policy Changed
Detects the unified audit log operation SharingPolicyChanged. Microsoft documents that it is written when a SharePoint or global administrator changed a SharePoint sharing policy by using the Microsoft 365 admin center, the SharePoint admin center or the SharePoint Management Shell, that any change to the settings in the sharing policy of the organization is logged, and that the policy that was changed is identified in the ModifiedProperties field. The organization-level sharing setting affects all SharePoint sites and each user's OneDrive. Microsoft does not publish the names that appear in ModifiedProperties, so the rule matches the operation and fires for a change in either direction. Read the property name, the new value and the previous value in the event. The account is in UserId.
title: SharePoint Organization Sharing Policy Changed
id: 861d70e5-c5be-4172-b67e-0a7f1a7dee88
status: experimental
description: >-
Detects the unified audit log operation SharingPolicyChanged. Microsoft
documents that it is written when a SharePoint or global administrator
changed a SharePoint sharing policy by using the Microsoft 365 admin
center, the SharePoint admin center or the SharePoint Management Shell,
that any change to the settings in the sharing policy of the organization
is logged, and that the policy that was changed is identified in the
ModifiedProperties field. The organization-level sharing setting affects
all SharePoint sites and each user's OneDrive. Microsoft does not publish
the names that appear in ModifiedProperties, so the rule matches the
operation and fires for a change in either direction. Read the property
name, the new value and the previous value in the event. The account is in
UserId.
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/turn-external-sharing-on-or-off
- https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.t1484
logsource:
product: m365
service: sharepoint
detection:
selection:
Operation: SharingPolicyChanged
condition: selection
falsepositives:
- SharePoint administrators who adjust sharing settings on purpose, for example for a project with an external partner or to tighten the policy. The change is rare, so confirm each event with a change record.
level: medium
False positives
- SharePoint administrators who adjust sharing settings on purpose, for example for a project with an external partner or to tighten the policy. The change is rare, so confirm each event with a change record.
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.
Anonymous sharing links appear after a change of the sharing policy
A sharing policy is loosened for a purpose. When the purpose is exfiltration, links that anyone can open are created soon after the change, often by the account that made it or by one other account. Links of a kind the tenant did not have before the change show that the change was a loosening and that it is being used.
- Unified audit log:
SharingPolicyChanged. TakeUserIdand the time. - Count
AnonymousLinkCreatedin the 7 days before the change and in the 24 hours after it. - Alert when links appear after the change in a tenant that had none before, or when their number rises sharply.
- Raise the priority when the
UserIdof the new links is the account that changed the policy.
EventsSharingPolicyChangedAnonymousLinkCreated
LimitsA planned opening of external sharing is followed by honest use of the new links. It cannot see sharing with named guests, which other sharing operations record. The 7 days and the 24 hours are starting points.
Access from outside the former boundary after a device or network policy change
The device and location policies are removed so that somebody can come in from where they could not before. File access from an address outside your trusted ranges, in the hours after the policy changed, is the use of the opening.
- Unified audit log:
DeviceAccessPolicyChangedorNetworkAccessPolicyChanged. TakeUserIdand the time. - In the next 48 hours:
FileAccessed,FileDownloadedorFileSyncDownloadedFullwhoseClientIPis outside the address ranges that were in your location-based policy. - Alert on such access, first of all by the account that changed the policy.
EventsDeviceAccessPolicyChangedNetworkAccessPolicyChangedFileAccessedFileDownloadedFileSyncDownloadedFull
LimitsIt needs your own list of trusted ranges, and it is of no use if the policy never restricted locations. After a planned removal every remote worker matches. The 48 hours are a starting point.
Triage
- Read UserId for the account and Operation for the policy that changed.
- For the sharing policy, read ModifiedProperties. Microsoft's schema describes it as the name of the property that was modified, the new value and the previous value. Decide whether the change loosened or tightened the policy.
- For the device and network policies, open Access control in the SharePoint admin center and compare the setting with your intended value. Microsoft documents only the operation for these two.
- Ask for the change record. Tenant-wide SharePoint policies change rarely and on purpose.
- Review the sign-in of the account, and look for sharing links and downloads after the change.
Response
Once the attack is confirmed:
- Put the policy back to its previous value.
- Find what happened while it was weakened. Search the audit log for
AnonymousLinkCreatedand other sharing operations, and for file access and downloads from devices or addresses the policy used to block. - Remove the sharing links that were created in that time, and treat the files they exposed as disclosed.
- Revoke the sessions and reset the credentials of the administrator account that made the change, and remove its role until the takeover is understood.
- Review the other tenant settings that account changed.
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.
- Set organization-level sharing to the most restrictive level the business accepts, and disable Anyone links for the sites that are protected by device restrictions. Microsoft notes that Anyone links are not affected by the unmanaged device policies.
- Enforce device and location requirements with a Microsoft Entra Conditional Access policy for the Office 365 cloud app as well, so that the SharePoint setting is not the only control.
- Record the intended values of the three policies and compare the tenant with them regularly.
- Send the SharePoint records of the unified audit log to your SIEM.
Frequently asked questions
Does the audit record say whether the policy was weakened or tightened?
The operation name does not. For the sharing policy, Microsoft states that the policy that was changed is identified in ModifiedProperties, which the schema describes as the name of the modified property with its new and previous value. For the unmanaged devices policy and the location-based policy Microsoft documents the operation only, so compare the setting in the admin center with the value you intended.
Do the unmanaged device restrictions also stop sharing links that anyone can open?
No. Microsoft notes that Anyone links, the shareable links that do not require sign-in, are not affected by the policies that block or limit unmanaged devices. People who have such a link can download the item. Microsoft advises disabling Anyone links for all sites where those policies are enabled.
Does the organization-level sharing setting cover OneDrive as well?
Yes. Microsoft states that the organization-level setting affects all SharePoint sites and each user's OneDrive. A change that opens external sharing at that level therefore widens what every user can share from their own files.
Is there a public incident report for this technique?
No public incident report describes this at the audit event level. The page is based on what Microsoft documents about the three policies: what each one controls, who can change it and which audit operation the change writes.
References
- MITRE ATT&CK T1484: Domain or Tenant Policy Modification
- Microsoft Purview: Audit log activities (Site administration activities)
- Office 365 Management Activity API schema (SharePoint schema, ModifiedProperties)
- Manage sharing settings for SharePoint and OneDrive in Microsoft 365
- SharePoint and OneDrive unmanaged device access controls
- Control access to SharePoint and OneDrive data based on network location