SharePoint, Teams & SOC Playbooks · T1566 / T1204

Microsoft Teams Audit Log Events for Phishing, External Chat & Malware Delivery

Direct Answer (Key Forensic Takeaway)

External Microsoft Teams social engineering—such as attackers using external M365 trial tenants to impersonate "IT Support" and initiate Quick Assist or RMM tool installations—emits ChatCreated, MemberAdded, and TeamsSessionStarted events under Purview RecordType 25 (MicrosoftTeams), exposing HasForeignTenantUsers=true and external ParticipatingTenantIds.

Why This Artifact Matters in M365 Incident Response

Email security gateways and DMARC policies have grown strong enough that ransomware affiliates (including groups impersonating corporate Helpdesk staff) increasingly bypass email altogether—reaching employees directly inside Microsoft Teams via open external federation.

By registering a generic Microsoft 365 developer/trial tenant named "Helpdesk Support" and messaging targets directly on Teams, attackers trigger immediate trust and avoid email filters completely. Purview RecordType 25 (`MicrosoftTeams`) gives defenders the exact metadata needed to trace external chat initiation.

When analyzing Purview UAL exports, understand the boundary between **RecordType 25 (MicrosoftTeams)** and **RecordType 6 (SharePointFileOperation)**: Teams UAL records metadata (`ChatCreated`, `MemberAdded`, `AppInstalled`, `BotAddedToTeam`, `TeamsSessionStarted`) including `CommunicationType` (`OneOnOne` vs. `GroupChat`) and `ParticipantInfo.HasForeignTenantUsers` / `ParticipatingTenantIds`.

Meanwhile, if someone sends or downloads a file inside a Teams chat, the underlying storage is SharePoint/OneDrive—generating `FileUploaded` or `FileDownloaded` under RecordType 6. Plaintext message text requires Purview eDiscovery Content Search rather than standard UAL.

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

Step-by-Step Attack Reconstruction Timeline

An employee’s laptop launches Quick Assist followed by an unauthorized RMM agent after someone messaged them on Teams claiming to fix "an urgent MFA sync error." Checking Email Message Trace turns up zero suspicious emails.

Pulling RecordType 25 (`MicrosoftTeams`) from Purview UAL into AuditVane and searching `HasForeignTenantUsers` instantly surfaces a `ChatCreated` event 18 minutes prior to Quick Assist launch—capturing the exact external tenant GUID inside `ParticipatingTenantIds` so the SOC blocks that tenant across Teams Admin Center.

External Teams ChatCreated AuditData Sample

{
  "CreationTime": "2026-12-03T15:10:42Z",
  "Operation": "ChatCreated",
  "RecordType": 25,
  "Workload": "MicrosoftTeams",
  "UserId": "target.employee@contoso-demo.invalid",
  "CommunicationType": "OneOnOne",
  "ParticipantInfo": {
    "HasForeignTenantUsers": true,
    "HasUnauthenticatedUsers": false,
    "ParticipatingTenantIds": ["ext-attacker-tenant-8821"]
  }
}

Notice `ParticipantInfo.HasForeignTenantUsers: true` and `ParticipatingTenantIds`—AuditVane flattens nested `ParticipantInfo` keys automatically so searching `HasForeignTenantUsers` or `true` filters external chats immediately.

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
ChatCreatedNew 1:1 or group Teams chat startedInspect ParticipantInfo.HasForeignTenantUsers = true
MemberAddedUser or external guest added to chat/teamSpot unexpected external users added to channels
ParticipantInfo.ParticipatingTenantIdsExternal M365 tenant GUIDs in conversationExtract rogue external tenant IDs for federation block
AppInstalled / BotAddedToTeamThird-party Teams app or webhook addedVerify authorized Teams integrations & bots
TeamsSessionStartedDesktop/Web/Mobile Teams auth sessionLogs client IP, OS & version
FileUploaded / FileDownloaded (RecordType 6)File transferred inside Teams chatCorrelate alongside ChatCreated timestamps

Hunt External Teams Chats & Lock Down Open Federation in PowerShell

# 1. Pull external Teams chat creations from Purview UAL:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-14) -EndDate (Get-Date) -RecordType MicrosoftTeams `
  -Operations ChatCreated,MemberAdded,AppInstalled -SessionId ([guid]::NewGuid()) -SessionCommand ReturnLargeSet -ResultSize 5000 |
  Where-Object { $_.AuditData -match '"HasForeignTenantUsers":true' } |
  Export-Csv .\Teams_External_Chats.csv -NoTypeInformation

# 2. Check current Teams Tenant Federation Policy (MicrosoftTeams module):
Get-CsTenantFederationConfiguration | Format-List AllowFederatedUsers, AllowPublicUsers, AllowedDomains

Sample External Teams Federation Audit

AllowFederatedUsers : True
AllowPublicUsers    : True   <-- Allows personal Teams/consumer accounts!
AllowedDomains      : AllowAllKnownDomains  <-- OPEN FEDERATION RISK

Teams Federation Modes & Social Engineering Exposure

Teams External Access SettingWho Can Message Your Staff?Recommended Security Posture
Allow all external domains (Default!)ANY Microsoft 365 tenant worldwide including attacker trial tenantsHigh Risk — Replace immediately unless public sales/support mandates it
Allow only specific domainsExplicitly allowlisted partner/vendor domains onlyBest Enterprise Default — eliminates random Teams phishing
Block only specific domainsEveryone except known blocked tenantsReactive — attackers spin up fresh trial domains in minutes
Allow external unmanaged Teams usersConsumer free Teams accounts (Gmail/Outlook.com)Disable (`AllowPublicUsers = False`) unless explicitly required

Step-by-Step Triage, Containment & Verification

  1. Pull RecordType 25 (`MicrosoftTeams`) exports from Purview UAL whenever investigating Quick Assist, AnyDesk, or suspicious helpdesk social engineering.
  2. Drop the CSV into AuditVane and filter by `Workload = MicrosoftTeams` or search `HasForeignTenantUsers` in the search box.
  3. Extract `ParticipatingTenantIds` and external participant UPNs from flagged `ChatCreated` / `MemberAdded` events.
  4. Search Purview eDiscovery Content Search for the external participant’s UPN if you need the exact chat messages sent during the attack.
  5. Block the attacker’s domain/tenant immediately in Teams Admin Center -> Users -> External access, and strongly consider switching from Open Federation to **Allow only specific external domains** with `AllowPublicUsers = False`.

How to Verify Containment Completed Cleanly

  • ParticipatingTenantIds from vishing attacks blocked in Teams Federation settings.
  • Endpoint EDR checked for Quick Assist, AnyDesk, ScreenConnect, or RMM drops timed right after ChatCreated.
  • Teams External Access reviewed for AllowPublicUsers and domain allowlisting.

Analyst Blind Spots, Licensing Quirks & False Positives

By default, newly provisioned Microsoft 365 tenants leave Teams External Access open to ALL external domains (`AllowAllKnownDomains`) AND consumer Teams users (`AllowPublicUsers = True`)! Check `Get-CsTenantFederationConfiguration` proactively rather than waiting for an incident.

Remember that UAL RecordType 25 does NOT store message bodies—only participant metadata and timestamps. Use Purview Content Search / eDiscovery when message text is needed.

Frequently Asked Questions

Do Purview Unified Audit Logs record Teams message chat text?

No. Purview UAL logs metadata (ChatCreated, MemberAdded, AppInstalled, SessionStarted); actual chat message bodies require Purview Content Search / eDiscovery.

How can we stop external attackers impersonating Helpdesk on Microsoft Teams?

Switch Teams External Access from Open Federation to "Allow only specific domains" and disable communication with unmanaged consumer Teams accounts (`AllowPublicUsers = False`).

Does AuditVane flatten MicrosoftTeams RecordType 25 JSON?

Yes! AuditVane flattens nested ParticipantInfo and ParticipatingTenantIds keys cleanly into searchable columns.

Where are files shared inside Teams chats logged?

Files shared in 1:1/group chats use the sender’s OneDrive and channel files use SharePoint—emitting RecordType 6 FileUploaded/FileDownloaded events.

Related Forensics Guides