SaaS integration and OAuth abuse
A connected app or integration token pulls data from a software as a service (SaaS) platform through its API, after a vendor breach or a voice phishing call. Export the platform logs first, because retention is short. Then revoke the tokens and block the app.
- Export the platform logs for the whole window before revoking any token.Intelligence/Investigations
- List every platform the app or vendor connects to, with each grant's scopes and integration user.Operations
- Block the app: Salesforce Connected Apps OAuth Usage, Entra permission removal, or Google Workspace Manage App Access.Operations
- Rotate the integration user passwords, API keys and client secrets the vendor stored.Operations
- For voice phishing, revoke the user's sessions at the identity provider.Operations
- Name a security contact at the vendor and log each statement of scope with date and time.Liaison
Then work the page: Scope, Contain and eradicate, Keep it closed, Coordinate with the vendor, Notify.
An OAuth grant lets an application read a SaaS platform through its API with no password prompt. Attackers get a grant in one of two ways. In the first, a vendor that integrates with you is breached and the tokens it stores for your tenant are used against you.
In the second, a caller posing as IT support talks an employee into authorizing an attacker's app. The data leaves through ordinary API calls, and the evidence sits in platform event logs.
Microsoft reports ShinyHunters-associated campaigns using both routes against Salesforce from mid-2025 to mid-2026. Mandiant's M-Trends 2026 reports voice phishing at 11% of intrusions in 2025, the second most common initial infection vector after exploits.
This scenario is an addition to the book. Sources checked October 2026: Microsoft, ShinyHunters OAuth abuse; Microsoft's device code phishing report; GTIG on UNC6395; M-Trends 2026; Salesforce Trailhead on event log files; Microsoft Learn on Entra data retention and audit log retention policies; Salesforce Help on the OAuth 2.0 device flow; Google Workspace Help on data retention and OAuth log events. Sources checked September 2026: GTIG on UNC6040; Salesforce advisories on Drift and Gainsight; Salesforce, Microsoft Learn and Google Workspace admin documentation.
What is different
| Route | Known cases | What the response has to cover |
|---|---|---|
| Integration vendor breached | UNC6395 used Salesloft Drift OAuth tokens against Salesforce instances from August 8 to at least August 18, 2025, and Drift Email tokens against a few Google Workspace accounts. Gainsight followed in November 2025 and Klue in June 2026. | Every token and secret the vendor stored for you. UNC6395 searched records for AWS keys, passwords and Snowflake tokens. |
| Voice phishing for consent | UNC6040 callers posed as IT support and had staff open Salesforce's connected app setup page and enter a connection code. That linked a modified Data Loader, sometimes named "My Ticket Portal". UNC6040 then moved to Okta and Microsoft 365. | The user's identity provider account and the SaaS grant. Extortion (UNC6240) can follow months later. |
| Device code phishing | The connection code step matches Salesforce's OAuth 2.0 device flow, where the user enters an 8-character code at the /setup/connect verification URL. Microsoft reported an April 2026 device code phishing campaign that yielded access and refresh tokens. | Sign-ins through the device code flow, and a Conditional Access policy that blocks the flow |
A password reset leaves the grant working. Revoke the tokens and remove or block the app.
Scope
Generic steps are on Scope. Log retention is short, so export first. Collection is on the evidence page.
| # | Item | Owner |
|---|---|---|
| 1 | List every platform the app or vendor connects to, with each grant's scopes and integration user | Operations |
| 2 | Export the platform logs below for the whole window before revoking any token | Intelligence/Investigations |
| 3 | Filter API activity by the app's connected app or client ID, source IP address and user agent, and note the rows returned per query | Intelligence/Investigations |
| 4 | List the objects and reports read or exported, and search records for secrets stored in fields, notes and attachments | Intelligence/Investigations |
| 5 | For voice phishing, check the user's identity provider sign-ins and other SaaS accounts for the same attacker | Intelligence/Investigations |
| Platform | Log | Retention and prerequisite |
|---|---|---|
| Salesforce | Setup Audit Trail | 180 days, all orgs |
| Salesforce | Event Log Files: Login, Logout, API Total Usage and four other types | 24 hours without the Event Monitoring add-on |
| Salesforce | Event Log Files: other types, including Unique Query and Bulk API | Event Monitoring add-on or Shield, retention up to one year for some types |
| Salesforce | Real-Time Event Monitoring objects, such as ApiEvent and LoginEvent | Salesforce Shield or Event Monitoring add-on |
| Microsoft Entra | Sign-in logs and audit logs, including "Consent to application" | 7 days on Entra ID Free, 30 days on P1 or P2 |
| Microsoft 365 | Purview audit log | 180 days on Audit (Standard). Audit (Premium) keeps Entra, Exchange, OneDrive and SharePoint records one year. |
| Google Workspace | OAuth log events: grant, revoke, and API call | 6 months. API call events need Enterprise Standard or Plus, Education Standard or Plus, or Cloud Identity Premium. |
UNC6395 deleted query jobs, and the logs kept the record.
Contain and eradicate
Generic steps are on Contain and Eradicate. Record each decision in T3 Containment decision record.
| # | Item | Owner |
|---|---|---|
| 1 | In Salesforce, block the app in Setup, Connected Apps OAuth Usage. Blocking ends all current sessions and prevents new ones until someone clicks Unblock. | Operations |
| 2 | In Entra, remove the app's delegated permissions: Remove-MgOauth2PermissionGrant | Operations |
| 3 | In Entra, remove the app's application permissions: Remove-MgServicePrincipalAppRoleAssignedTo | Operations |
| 4 | In Entra, set "Enabled for users to sign-in?" to No on the app, so no new tokens are issued | Operations |
| 5 | In Google Workspace, set the app to Blocked in Security, Access and data control, API controls, Manage App Access. Blocking stops its access to Google data. | Operations |
| 6 | Rotate the integration user passwords, API keys and client secrets the vendor stored | Operations |
| 7 | Rotate secrets found in exported records at the system that issued them | Operations |
| 8 | Review other apps from the same vendor, and block them until the vendor reports clean. Salesforce's Gainsight advisory covered Gainsight-published applications as a group. | Operations |
| 9 | For voice phishing, revoke the user's sessions at the identity provider, as in BEC | Operations |
Keep it closed
| # | Item | Owner |
|---|---|---|
| 10 | In Salesforce, install trusted apps, set access through Permitted Users, and give "Approve Uninstalled Connected Apps" to administrators alone. Uninstalled apps that use the device flow are then blocked. | Operations |
| 11 | In Salesforce, restrict "API Enabled", "Customize Application" and "Manage Connected Apps" to named administrators, and set login IP ranges on profiles and connected app policies | Operations |
| 12 | In Entra, restrict user consent, and block the device code flow with a Conditional Access policy under Conditions, Authentication flows | Operations |
Coordinate with the vendor
Scope statements change. Drift tokens were revoked on August 20, 2025, and on August 28 GTIG widened its advice to every token stored in or connected to Drift. The supply chain scenario covers the contract side.
| # | Item | Owner |
|---|---|---|
| 1 | Name a security contact at the vendor, and log each statement of scope with date and time | Liaison |
| 2 | Ask the vendor in writing, with T19, which of your tokens it stored, when they were exposed, and its indicators | Intelligence/Investigations |
| 3 | Watch platform advisories and trust pages for revocations, re-enablement and new indicators | Planning |
| 4 | Re-enable the integration after the vendor confirms remediation and the Incident Commander approves | Incident Commander |
Notify
Customer relationship management (CRM) data contains customer contacts and support cases. Rate it against notification deadlines from the time of discovery.
| # | Item | Owner |
|---|---|---|
| 1 | Map the exposed objects and fields to the people and customers they describe | Planning |
| 2 | Assess regulatory and contractual notices, and send them by their deadlines, one T17 per regime | Legal advisor |
| 3 | Route extortion contact to the Legal advisor, and send no reply before review | Legal advisor |
| 4 | Agree customer and public statements with the vendor's timing | Public Information Officer |
- Revoking or blocking the app before export can leave you with 24 hours of Salesforce event log files, or none.
- Revoked consent can be granted again until user consent is restricted.