← All articles
Microsoft 365 · Technical field note

Investigating suspicious SharePoint access: file activity versus external sharing

Use Microsoft 365 audit evidence to separate sharing invitations, actual file access and downloads.

Why a file-access alert is not a data-loss conclusion

In August 2025, I investigated Microsoft 365 activity associated with a suspicious source IP. The initial question included possible mailbox access, but closer examination of the audit event pointed to SharePoint file access. A membership-style identity in the event raised a second question: had the document been shared with an external personal Microsoft account?

Those questions require separate evidence. The examples below use fictional identities, an RFC 5737 documentation IP, and a synthetic filename. The original case details and disposition are not disclosed.

1. Establish which workload emitted the event

Run this in a Sentinel workspace collecting Microsoft 365 audit events into OfficeActivity. Change the example IP and time range to authorised investigation values.

kusto
let pivotIP = "198.51.100.28";
let start = ago(7d);
OfficeActivity
| where TimeGenerated >= start
| where ClientIP == pivotIP
| summarize Events=count(), FirstSeen=min(TimeGenerated),
    LastSeen=max(TimeGenerated)
    by OfficeWorkload, Operation, UserId
| order by Events desc

ClientIP may contain a port or another representation depending on the event. Inspect actual values and normalise addresses before concluding that a search is exhaustive. Do not split on colon indiscriminately because IPv6 contains colons.

An Exchange MailItemsAccessed event and a SharePoint FileAccessed event have different meanings. A shared sign-in source does not turn one into the other.

2. Construct the document timeline

kusto
let document = "Quarterly-Review.xlsx";
OfficeActivity
| where TimeGenerated > ago(14d)
| where OfficeWorkload in~ ("SharePoint", "OneDrive")
| where OfficeObjectId contains document
    or SourceFileName =~ document
| project TimeGenerated, OfficeWorkload, Operation,
    UserId, ClientIP, OfficeObjectId, SourceFileName,
    UserAgent, TargetUserOrGroupName, ResultStatus
| order by TimeGenerated asc

Use a precise object URL or unique object identifier once identified: two similarly named documents may otherwise be mixed into one timeline. Review the original audit record in Purview when normalised fields are incomplete.

3. Seek evidence of sharing and subsequent access

kusto
let document = "Quarterly-Review.xlsx";
OfficeActivity
| where TimeGenerated > ago(30d)
| where OfficeWorkload in~ ("SharePoint", "OneDrive")
| where OfficeObjectId contains document
    or SourceFileName =~ document
| where Operation in~ (
    "SharingSet", "SharingInvitationCreated",
    "SharingInvitationAccepted", "SecureLinkCreated",
    "AddedToSecureLink", "AnonymousLinkCreated",
    "AnonymousLinkUsed", "FileAccessed", "FileDownloaded")
| project TimeGenerated, Operation, UserId, ClientIP,
    OfficeObjectId, TargetUserOrGroupName,
    OperationProperties, ResultStatus
| order by TimeGenerated asc

An invitation is not necessarily accepted. A link being created is not proof that its recipient used it. A FileAccessed event is evidence of recorded access, not automatically a local download or malicious exfiltration. A membership claim identifies a principal in a specific context; verify its mapping to an Entra guest or external identity before attributing an action.

4. Corroborate identity and scope

Review Entra interactive and non-interactive sign-in logs, application and session context, the document's effective permissions and sharing history, and other files accessed by the same principal. If an incident is credible, preserve audit records and coordinate containment and sharing revocation with the data owner. Investigate historical coverage and retention before interpreting missing events.

Validation checklist

In an approved lab, share a synthetic file with a test guest, accept the invitation, access the document, then separately download it. Compare the captured operations, principals and target fields against the original audit data. Record which events arrive and their delay; don't assume all tenant configurations provide identical coverage.

References