SharePoint, Teams & SOC Playbooks · T1567.002

AnonymousLinkCreated & External Sharing Audit Log Investigation in M365

Direct Answer (Key Forensic Takeaway)

When a compromised account or insider generates a public "Anyone with the link" SharePoint or OneDrive URL, Purview RecordType 14 logs AnonymousLinkCreated—and logs AnonymousLinkUsed with the downloader’s external ClientIP whenever anyone fetches it unauthenticated. AuditVane rule AV-010 flags AnonymousLinkCreated, CompanyLinkCreated, AddedToSecureLink, and SharingSet immediately.

Why This Artifact Matters in M365 Incident Response

Downloading gigabytes of confidential files onto a corporate laptop monitored by DLP or EDR takes effort and leaves local disk traces. Instead, insiders and cloud intruders often generate a public "Anyone with the link" URL inside OneDrive or SharePoint, copy that URL, and pull the files later from an unmonitored personal device or external IP.

Investigating SharePoint sharing events (`RecordType 14`) answers two vital questions: who exposed data externally, and did an external IP actually click and download from that public link?

Microsoft Purview logs sharing lifecycle actions under `SharePointSharingOperation` (`RecordType 14`): `AnonymousLinkCreated` (Anyone link generated), `AnonymousLinkUsed` (unauthenticated external access!), `CompanyLinkCreated` (organization-wide access), `AddedToSecureLink` (specific external email address invited, such as a personal Gmail or competitor domain), and `SharingSet`.

AuditVane rule `AV-010` flags sharing creation operations automatically, while filtering your UAL export for `AnonymousLinkUsed` on the matching `ObjectId` proves whether third parties accessed the exposed folder.

1. RAW TELEMETRY SharePoint, Teams & SOC Playbooks T1567.002 2. CLIENT-SIDE PARSE AuditVane Engine AnonymousLinkCreated SharePoint au 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for AnonymousLinkCreated SharePoint audit log (T1567.002)
AdSense-Ready In-Article Placement

Step-by-Step Attack Reconstruction Timeline

During an offboarding audit, an IT contractor creates a public Anyone link on `/Documents/Customer-DB-Export` at 19:03 UTC (`AnonymousLinkCreated`). Two hours later at 21:14 UTC—after the contractor’s corporate laptop was already returned—Purview records `AnonymousLinkUsed` on that exact `ObjectId` from a completely new home residential ISP IP.

AuditVane flags `AnonymousLinkCreated` under `AV-010`, and pivoting on the `ObjectId` URL inside the Search box reveals the subsequent `AnonymousLinkUsed` exfiltration.

AnonymousLinkCreated AuditData Sample

{
  "CreationTime": "2026-12-03T19:03:11Z",
  "Operation": "AnonymousLinkCreated",
  "RecordType": 14,
  "Workload": "OneDrive",
  "UserId": "it.contractor@contoso-demo.invalid",
  "ClientIP": "104.28.221.14",
  "ObjectId": "https://contoso-my.sharepoint.com/personal/it_contractor/Documents/Customer-DB-Export",
  "UniqueSharingId": "share-guid-88412"
}

Observe `UniqueSharingId` and `ObjectId`—searching either string in Purview UAL uncovers every `AnonymousLinkUsed` event generated whenever anyone hits that link.

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
AnonymousLinkCreatedPublic "Anyone with the link" URL createdHigh risk unless intentionally public marketing asset
AnonymousLinkUsedUnauthenticated external user opened/downloaded linkCaptures exact external downloader ClientIP & UserAgent!
CompanyLinkCreatedShareable link granting access to ALL employeesRisk of exposing HR/M&A/Salary data internally
AddedToSecureLink"Specific people" external invite addedInspect TargetUserOrGroupName for personal Gmail/Proton
SharingSet / SharingInheritanceBrokenDirect permissions altered on folder/siteTracks manual external guest grants
ObjectId / UniqueSharingIdExact SharePoint item path & link GUIDPivot across Creation -> Used -> Revoked events

Hunt External Shares & Anonymous Link Usage in PowerShell & KQL

# PowerShell Purview sweep for external & anonymous sharing:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) `
  -Operations AnonymousLinkCreated,AnonymousLinkUsed,AddedToSecureLink,CompanyLinkCreated `
  -SessionId ([guid]::NewGuid()) -SessionCommand ReturnLargeSet -ResultSize 5000 |
  Export-Csv .\SPO_External_Shares.csv -NoTypeInformation

// Sentinel KQL: pair AnonymousLinkCreated with AnonymousLinkUsed:
OfficeActivity | where Operation in ("AnonymousLinkCreated","AnonymousLinkUsed","AddedToSecureLink")
| project TimeGenerated, Operation, UserId, ClientIP, SourceFileName, OfficeObjectId, TargetUserOrGroupName

Sample External Link Usage Discovery

TimeGenerated        Operation            UserId                   ClientIP       OfficeObjectId
-------------        ---------            ------                   --------       --------------
2026-12-03T19:03:11Z AnonymousLinkCreated it.contractor@contoso... 104.28.221.14  .../Customer-DB-Export
2026-12-03T21:14:02Z AnonymousLinkUsed    Anonymous                73.162.40.19   .../Customer-DB-Export

SharePoint Sharing Link Types & Security Risk Profiles

Sharing Link TypePurview Audit OperationRisk Level & Recommended Tenant Policy
Anyone with the linkAnonymousLinkCreated / AnonymousLinkUsedCritical — Disable Anyone links tenant-wide or enforce 7-day expiry + Read-Only
Specific external peopleAddedToSecureLinkHigh — Restrict external sharing strictly to allowlisted partner domains
People in your organizationCompanyLinkCreatedMedium — Never make Company-wide links the default sharing option!
People with existing accessSharingSet (minimal)Safe default — set as default link type in SharePoint Admin Center

Step-by-Step Triage, Containment & Verification

  1. Drop `RecordType 14` Purview CSVs into AuditVane and click AV-010 findings to isolate all sharing creations.
  2. For every `AnonymousLinkCreated` hit, search AuditVane (or Purview) by `ObjectId` / `UniqueSharingId` to see whether `AnonymousLinkUsed` fired.
  3. Inspect `AddedToSecureLink` rows inside the Event Inspector to read `TargetUserOrGroupName`—checking for personal `@gmail.com` or `@proton.me` addresses.
  4. Revoke active sharing links immediately on the affected SharePoint/OneDrive files via SharePoint Admin Center or PnP PowerShell (`Remove-PnPFileSharingLink`).
  5. Harden SharePoint Admin Center -> Policies -> Sharing: disable "Anyone" links (or enforce strict expiry + view-only), set default link type to "Specific people" or "Only people with existing access", and limit external sharing by domain allowlist.

How to Verify Containment Completed Cleanly

  • All unauthorized Anyone and External Guest links revoked and confirmed inactive.
  • AnonymousLinkUsed IPs checked to determine whether external download occurred.
  • SharePoint tenant default sharing link changed away from "Anyone" and "Company-wide".

Analyst Blind Spots, Licensing Quirks & False Positives

Terminating an employee or locking their Entra account does NOT deactivate an existing "Anyone with the link" SharePoint URL! Public sharing links stay live on SharePoint until explicitly revoked or expired.

Remember that in `AnonymousLinkUsed` rows, `UserId` typically reads `Anonymous` or `urn:spo:anon#...`—so querying Purview solely by `-UserIds contractor@domain.com` will completely miss the later `AnonymousLinkUsed` download! Always search `AnonymousLinkUsed` by `-Operations` or `ObjectId`.

Frequently Asked Questions

Does disabling an employee’s account automatically break their Anyone links?

No! "Anyone with the link" URLs work without user authentication and remain accessible until deleted, revoked, or expired.

Why didn’t UserIds filtering find AnonymousLinkUsed events?

Because unauthenticated link downloaders have no tenant UPN—their UserId logs as Anonymous, so you must filter by Operations=AnonymousLinkUsed or ObjectId.

What is AddedToSecureLink?

It logs when a user shares a file/folder with specific named external emails (often revealing data sent to personal Gmail/Yahoo accounts).

Does AuditVane flag AnonymousLinkCreated automatically?

Yes! AuditVane rule AV-010 flags AnonymousLinkCreated, CompanyLinkCreated, AddedToSecureLink, and SharingSet.

Related Forensics Guides