When an attacker gets into a chat workspace, the damage rarely stays with one user: app and bot tokens keep working after a password reset, external channels carry the intrusion to partners, and years of messages hold credentials that open other systems. This playbook covers the response to a compromised Slack or Microsoft Teams workspace, from a hijacked admin or member account to a malicious or stolen app token. It is built around the work that is specific to chat platforms: revoking sessions and app tokens, cutting external federation and shared channels, scoping what was read or exported, and treating secrets posted in channels as exposed. It is for collaboration platform administrators, identity teams and incident responders. Platforms are listed alphabetically; the order is not a ranking. Where the identity provider or the whole Microsoft 365 tenant is compromised, run the Microsoft 365 Tenant Compromise Playbook or the Identity Provider Tenant Compromise Playbook alongside this one, and see the Google Workspace Compromise Playbook for the equivalent tenant-level response in Google.
Key takeaways
- Sessions and tokens are separate kill switches. Resetting a password does not by itself remove app tokens, bot tokens, incoming webhooks or connectors; each needs its own revocation step.
- Cut external paths early. Shared channels and external federation let an intruder reach partner organisations, so restrict or disconnect them during containment, then restore them deliberately.
- Scope reads and exports, not just changes. The most damaging chat compromises are data theft, so pull file download, message read and export events before deciding what was exposed.
- Every secret posted in reachable channels is compromised. Search the conversations the attacker could read for keys, passwords and webhook URLs, then rotate them at the source system.
- Audit data depends on plan and retention. Both platforms tie audit depth and history to licences, so confirm what you can see in the first hour and export it before it ages out.
How the incident shows up
Chat compromises surface through platform anomaly alerts, users reporting strange messages, partners reporting phishing from a trusted shared channel, or a secret posted in chat being used elsewhere. The table lists the audit events that most often start or confirm an investigation. Slack's Audit Logs API is available on Enterprise plans and needs the auditlogs:read scope from an organisation-level install; Microsoft Teams activity is recorded in the Microsoft Purview audit log, with retention depending on the subscription and licences assigned.
| What happened | Slack audit action | Microsoft Teams audit operation |
|---|---|---|
| Suspicious sign-in or session | user_login, user_login_failed, anomaly (reasons such as ip_address, asn, tor, session_fingerprint, unexpected_client) | Sign-in events in Microsoft Entra ID sign-in logs, since Teams uses Entra ID authentication |
| New or changed app | app_installed, app_approved, app_scopes_expanded, bot_token_upgraded | AppInstalled, BotAddedToTeam, ConnectorAdded, TabAdded |
| Privilege change | role_change_to_admin, role_change_to_owner | MemberAdded (with role in the audit data), TeamSettingChanged, TeamsTenantSettingChanged |
| Data access or export | file_downloaded, manual_export_started, manual_export_downloaded, anomaly reasons excessive_downloads and unexpected_scraping | MessagesExported, MessagesListed, MessageRead, ChatRetrieved, RecordingsExported, TranscriptsExported |
| External sharing change | external_shared_channel_connected, external_shared_channel_access_upgraded, guest_created | InviteSent, InviteeResponded (shared channel invitations), MemberAdded for guests |
Slack documents that its Audit Logs API returns data without judging whether an action was appropriate, and Microsoft notes that changes made through Entra ID or Graph can show an existing team owner as the initiator in Teams events, so always confirm the actor in the identity logs. The Slack Audit Logs Detection Guide and the Collaboration platform investigations guide cover detection rules and evidence locations in depth.
Triage questions
- Which identity is compromised? A member, a guest, a workspace or org admin, or an app (bot token, user token held by an integration, incoming webhook, connector). The answer decides which containment branch below applies.
- How did the attacker get in? Phished credentials, a stolen session cookie, a token leaked from code or a vendor, a malicious app approved by a user, or a compromised partner in a shared channel. A stolen session or token survives a password reset.
- What could the identity read? List public and private channels, direct messages, shared or external channels and files in reach. For apps, read the granted scopes or permissions: an app with history scopes can read whole channel histories.
- Did anything leave the platform? Look for exports, bulk file downloads, high API call volumes and new integrations that send data out.
- Are external organisations involved? Shared channels and federated chats both expose partners and are a route for the attacker to phish them with your organisation's trust.
- What audit data do we have? Confirm plan, licence and retention for each platform now, and start exports before the window closes.
Containment priorities
Work through the order below on whichever platform is affected. Record every action and its time so investigators can separate attacker changes from your own.
- Preserve first, briefly. Start audit log exports for the affected identities and the incident window before removing anything the attacker created.
- Kill user sessions for the compromised accounts, then reset passwords and re-register MFA through the identity provider.
- Disable or remove suspicious apps and revoke their tokens. Include integrations installed or given new scopes during the incident window.
- Restrict external paths. Remove external organisations from affected shared channels, block attacker-controlled domains, and remove guests added in the window.
- Remove persistence. Revert admin role grants, remove connectors, webhooks and tabs the attacker added, and restore changed settings.
- Warn users and partners. Tell people in affected channels to treat recent requests and links from the compromised identity as suspect.
Slack
- Sessions: the admin.users.session.reset method wipes a user's sessions on all devices (or only mobile or only web sessions using its optional parameters), leaving the user signed out; it needs the admin.users:write scope and is available on Enterprise plans. The action appears in audit logs as user_session_reset_by_admin.
- Tokens: auth.revoke revokes a token; Slack documents that revoking a bot user token deactivates the bot and removes its channel memberships without uninstalling the app, and that apps.uninstall removes a workspace app. Uninstall apps you do not trust, rather than only revoking their tokens. See the Slack Tokens Security Guide for token types and How to investigate a compromised Slack token for a token-only incident.
- App controls: turn on app approval (Tools and settings, Manage apps, App Management Settings) if it is off, and add malicious or unneeded apps to the restricted list so they cannot be reinstalled.
- Slack Connect: owners and admins can remove an organisation from a Slack Connect channel from the channel's Settings tab; on Business+ and Enterprise plans they can disconnect individual external people instead. Slack notes that to end all communication with an organisation you disconnect from it entirely rather than from one channel. See the Slack Connect Security Guide.
- Availability: Slack documents the Audit Logs API and admin.users.session.reset as Enterprise plan features; Slack Connect removal requires a paid plan.
Microsoft Teams
- Sessions: Teams relies on Microsoft Entra ID, so session containment happens there. The Microsoft Graph revokeSignInSessions action invalidates the user's refresh tokens and browser session cookies; Microsoft notes revocation can take a few minutes and does not apply to external users, who sign in through their home tenant.
- Apps: block an app in the Teams admin center under Teams apps, Manage apps, by setting its status to Blocked; org-wide app settings control third-party and custom apps as a group and take effect after a few hours. To stop an Entra application from issuing tokens in your tenant, set "Enabled for users to sign-in?" to No on the enterprise application, which sets the service principal's accountEnabled property to false. See Teams App Governance.
- External access: in the Teams admin center under Users, External access, switch to blocking specific domains or allowing only specific domains, and turn off communication with unmanaged Teams accounts if the attack came that way. Microsoft notes that blocking a domain does not block its subdomains unless BlockAllSubdomains is set with Set-CsTenantFederationConfiguration, and that up to 200 specific external users can be blocked. See the External Collaboration and Federation Abuse Guide.
- Shared channels and guests: remove external participants from affected shared channels (shown in audit as TerminatedSharing) and remove guest accounts added during the incident through Entra ID. Guest access and external access are configured separately, so review both.
- Availability: Microsoft documents that audit retention and searchability depend on the Microsoft 365 subscription and licences assigned; the Defender portal option to manage blocked Teams domains requires Defender for Office 365 Plan 1 or 2.
Investigate: scope what was read, shared and exported
Chat compromises are mainly about data. Build three lists for the incident window.
| Question | Evidence | Output |
|---|---|---|
| What could the attacker read? | Channel and chat membership of compromised users at the time; scopes or Graph permissions granted to compromised apps | List of conversations in reach, by sensitivity |
| What did the attacker actually access? | File download and message read events, export events, anomaly alerts for downloads or scraping, API call volumes | Confirmed access list for breach assessment |
| What did the attacker send or change? | Messages posted by the identity, new apps, webhooks, connectors, tabs, role and setting changes | Persistence list and a list of recipients who may have been phished |
| Which secrets were exposed? | Searches of in-reach conversations and files for credential patterns and webhook URLs | Rotation list, owned by each source system's team |
Exports deserve particular care, because a bulk export is the quickest way to take everything. Slack's export options depend on plan: owners and admins can export public channels on all plans, while exports covering private channels and direct messages need an application on Business+ or a Support request on Enterprise. Check who held export rights (including the Export Admin system role) during the window. In Teams, MessagesExported, RecordingsExported and TranscriptsExported events show exports made through the platform's APIs.
For the secrets list, search the conversations the attacker could read, not only the channels where you expect secrets. See How to find secrets in Slack and Teams messages and the Webhook URL Leak Check. Rotate each secret where it is issued, then delete the message, in that order: deleting first removes the evidence of what was exposed.
Eradication
- Apps and integrations: review every app installed, approved or given expanded scopes or permissions during the window, and every incoming webhook, connector and tab added. Remove anything without a named owner and a business reason. See How to audit Slack apps, bots and tokens and the Microsoft Teams Security Guide.
- Roles: revert owner and admin grants made in the window and confirm the remaining admin list with the platform owner.
- Settings: compare app approval, external access, guest access and retention settings against the documented baseline and restore any that changed.
- Tokens held elsewhere: if an integration's token leaked from code, a CI system or a vendor, fix that source and rotate the token so a replacement does not leak the same way.
- Connected identities: if the attacker used the chat foothold to phish colleagues, run account checks on the recipients who clicked or replied.
Recovery
- Restore access in stages. Return compromised users once passwords, MFA and sessions are reset and their devices are checked.
- Reconnect partners deliberately. Re-share channels with external organisations only after both sides confirm their accounts are clean, and agree who can invite new members.
- Re-approve apps with least privilege. Reinstall needed integrations with fresh tokens and the narrowest scopes or permissions that work.
- Raise the baseline. Keep app approval on, limit external access to named domains where the business allows, and set audit log export to your SIEM so the next investigation does not depend on platform retention.
- Watch for return. Alert on new app installs, scope expansions, role changes and external connections for at least 30 days, with the compromised identities on a watch list.
Evidence to preserve
- Platform audit logs for the window, exported to storage you control: Slack audit actions from the Audit Logs API, and Teams operations from Microsoft Purview audit (Microsoft notes searches return at most 5,000 results, so page by date range or use the export option).
- Identity provider logs: sign-ins, MFA changes and app consent events for the compromised identities.
- App records: the app's name, ID, scopes or permissions, installer and install time before you remove it.
- Messages and files posted by the attacker, preserved through legal hold or eDiscovery tools before deletion.
- Change log of your containment actions with times.
Notification triggers
- Personal data: chat often holds employee and customer personal data. Under UK GDPR and EU GDPR Article 33, a notifiable personal data breach is reported to the supervisory authority without undue delay and, where feasible, within 72 hours of becoming aware of it.
- Partners in shared channels: tell external organisations whose members were in affected shared channels, both so they can check for phishing and because their data may be in scope.
- Secret owners: notify the owners of any third-party credential found in reachable conversations.
- Contracts and sector rules: check customer contracts and sector incident reporting rules, and record the decision either way.
Detection and measurement
- Time to session and token revocation: minutes from confirmation to all sessions and app tokens revoked.
- Apps with a named owner: percentage of installed apps and integrations with an owner and review date.
- External connections: number of external organisations or domains connected, and the share on an explicit allow list.
- Secrets found in chat per month: count from scheduled scans, trending down, with time to rotation.
- Audit coverage: share of workspaces or tenants whose audit logs flow to the SIEM with retention beyond the platform default.
Framework mapping
| Framework | Reference | Where it applies |
|---|---|---|
| MITRE ATT&CK | T1078.004 Cloud Accounts; T1550.001 Application Access Token; T1213 Data from Information Repositories; T1534 Internal Spearphishing | Account and token misuse, data collection from chat, phishing colleagues from a trusted account |
| NIST CSF 2.0 | RS.MI-01 Incidents are contained; RS.AN-03 analysis and root cause; RC.RP-01 recovery plan executed; DE.CM-03 personnel activity and technology usage monitored | Containment, scoping, recovery and ongoing monitoring |
| NIST SP 800-53 Rev. 5 | IR-4 Incident Handling; AC-2 Account Management; AU-6 Audit Record Review; IA-5 Authenticator Management | Response process, account and app removal, log review, secret rotation |
Common failure patterns
- Password reset, tokens untouched. The user's password changes but the stolen session or the malicious app's token keeps working.
- Deleting secrets before rotating them. The message with the key is removed, the key stays valid, and the evidence of exposure is gone.
- Forgetting partners. The workspace is cleaned but the attacker already phished a partner through a shared channel, and nobody told them.
- Revoking a token but leaving the app available. The app can be reauthorised or reinstalled; uninstall and restrict it in Slack, or block it in the Teams admin center and disable its Entra enterprise application.
- Finding the audit window has closed. Logs needed for scoping have aged out because nobody exported them on day one.
Practitioner checklist
- Confirm plan, licence and audit retention for each affected platform and start log exports.
- Identify the compromised identities and classify each as member, guest, admin or app.
- Revoke sessions, reset passwords and re-register MFA for compromised users.
- Uninstall or block suspicious apps, revoke their tokens and remove added webhooks, connectors and tabs.
- Remove external organisations and guests from affected shared channels and tighten external access.
- Build the read, sent and exported lists for the incident window.
- Search in-reach conversations for secrets, rotate each at source, then delete the messages.
- Revert role and setting changes and restore the baseline.
- Assess notification duties, including partners in shared channels.
- Monitor app installs, role changes and external connections for at least 30 days.
Standards and references
- NIST: SP 800-61 Rev. 3, Incident Response Recommendations and Considerations for Cybersecurity Risk Management
- Slack: Audit Logs API
- Slack: Anomalous events reference
- Slack: admin.users.session.reset method
- Microsoft: Audit log activities (Microsoft Teams activities)
- Microsoft: user revokeSignInSessions
- Microsoft: Manage external access in Microsoft Teams
- Slack: Remove organisations from a Slack Connect channel
Related NHI Mgmt Group resources: Collaboration platform investigations · Secrets in chat and tickets · Microsoft 365 Tenant Compromise Playbook · Google Workspace Compromise Playbook · Slack Tokens Security Guide