DET-045 · human · confidence Medium

External File Sharing Alert

Alert when files in SharePoint or OneDrive are shared with people outside the company.

External sharing is the simplest way for an insider to move files out of the tenant, and it leaves a clear audit event. Defender can alert on Shared file externally. Add filters for the file name, extension, site collection or user tags to focus on valuable data.

In the alert, read the item URL, who shared it, their IP, and the time. The external recipient appears as a rewritten address, where the at sign becomes an underscore and the guest domain follows, ending with the tenant name. Decode it to see who actually got access.

Data sources
Defender alert policySharePoint and OneDrive auditPurview audit log
Platforms
Microsoft 365

Logic

Operation = SharingSet OR AnonymousLinkCreated OR SecureLinkCreated | where TargetUserOrGroupType == "Guest" | summarize files=dcount(ObjectId) by UserId, bin(TimeGenerated, 1h) | where files > 10

False positives

Sales, vendor management and project teams share with customers and suppliers all the time. Use site labels to scope.

Catches 2 techniques