Join our Newsletter — 33% off our NHI Course
Home FAQ Threats, Abuse & Incident Response What should organisations do when a rogue OAuth…
Threats, Abuse & Incident Response

What should organisations do when a rogue OAuth app is discovered in Salesforce?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 8, 2026 Domain: Threats, Abuse & Incident Response

Organisations should revoke the app immediately, review all scopes and token grants, and inspect recent API activity to determine what data was accessed or exported. Then rotate related credentials, check for additional malicious apps or package installs, and preserve logs for incident response. Fast containment matters because attackers often use valid tokens to remain active even after the initial consent event.

Why a Rogue Salesforce OAuth App Is a High-Priority Containment Event

A rogue OAuth app in Salesforce is not just an app review issue; it is a live access path that may already hold valid authorization to CRM data and APIs. Once consent has been granted, attackers can often operate with legitimate tokens, which makes the activity harder to spot than password-based intrusion. The immediate concern is not the app name itself, but the scope it received, the records it could reach, and whether it has already moved data out of the tenant. The broad visibility gap around third-party OAuth connections is a recurring weakness in non-human identity security, and NHIMG research on third-party OAuth visibility shows why organisations often discover the problem late.

In practice, many security teams find the app only after data access has already occurred, rather than through proactive consent governance.

How It Works in Practice

The right response starts with containment, then attribution, then recovery. Revoking the rogue app cuts off future API calls, but that step alone does not answer what was already accessed. Security teams should treat the app as a non-human identity with an access history: review granted scopes, token lifetime, connected accounts, refresh-token behaviour, and the API endpoints touched during the suspicious window. If the app was installed by a user with broad rights, the blast radius may extend well beyond the initial Salesforce objects the team first notices.

That is why recent API activity matters as much as the app registration itself. Exports, bulk reads, report downloads, and metadata access can all indicate that the attacker used the app to enumerate customers, opportunities, cases, or files. If there are signs of persistence, teams should also check for additional malicious connected apps, packages, and any related OAuth consent events across the tenant. The goal is to determine whether this was a single compromised integration or part of a wider cloud access path.

A useful investigation sequence is:

  • Disable or revoke the app and any associated refresh tokens.
  • Review granted scopes, connected users, and admin consent history.
  • Inspect Salesforce API logs, event logs, and audit trails for unusual queries or exports.
  • Rotate any credentials or secrets that the app could reach indirectly.
  • Look for follow-on persistence, including additional connected apps or package installs.
  • Preserve evidence for incident response and legal review.

NHIMG guidance on the NHI lifecycle is relevant here because the app behaves like an identity with a lifecycle, not a one-time configuration object. These controls tend to break down when organisations rely on manual consent review, because the attacker can use valid tokens long after the original approval event.

Common Variations and Edge Cases

Tighter containment often increases business disruption, so organisations need to balance speed against the risk of breaking legitimate automation. A Salesforce app may support integrations that business teams depend on, and that creates pressure to delay revocation while people verify ownership. The problem is that delay works in the attacker’s favour, especially when the app has broad read access or offline token capability.

Current guidance suggests treating a user-installed app differently from a centrally governed enterprise integration. If the app was approved outside normal change control, the default assumption should be malicious or at least untrusted until verified. If the app was published by a known vendor but the consent event is unexpected, teams still need to assess whether the app was impersonated, tampered with, or over-scoped. In either case, the investigation should focus on what the token could do, not only who clicked approve.

One useful NHIMG statistic here is that 91.6% of secrets remain valid five days after the targeted organisation is notified, which reinforces the need for rapid revocation and follow-up checks rather than waiting for normal operational cycles. The practical edge case is a partially trusted app with limited scope: even then, the team should verify whether the app can chain into data export, email, file storage, or downstream API abuse before deciding the event is low impact.

Risk and Threat Considerations

The material risk is unauthorized data access through a trusted authorization channel. Rogue OAuth apps are attractive to attackers because they often bypass password resets, MFA prompts, and some perimeter controls by using already-granted access. That makes the issue a trust-abuse problem as much as an access-control problem.

Failure mechanism: A malicious or compromised app obtains consent, then uses valid access and refresh tokens to query Salesforce APIs, export records, or maintain persistence until the consent is revoked and related tokens are invalidated.

Impact: Sensitive customer, sales, case, or file data can be exposed; downstream systems fed by Salesforce may also inherit the compromise if they trust the same integration path.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Inventory and OwnershipRogue OAuth apps are non-human identities that must be owned and tracked.
NHI-03 — Secrets and Credential ManagementOAuth tokens and refresh tokens function as machine credentials in this incident.
NHI-06 — Privilege and Access ScopeThe risk depends on scopes, consent, and overbroad API permissions.
Recommendation — Inventory the app, assign ownership, and remove any unapproved OAuth access paths. Revoke exposed tokens and rotate related secrets before restoring trust. Review scopes and trim access to the minimum required for each integration.
CIS Controls v86.3 — Access Grant ManagementThis is a prompt to revoke unauthorized application access and session grants.
8.2 — Audit Log ManagementInvestigation requires reviewing logs for API use, exports, and follow-on activity.
Recommendation — Revoke rogue app grants and remove any unnecessary access permissions. Preserve and review audit logs to confirm what the app accessed or exported.
MITRE ATT&CKT1528 — Steal Application Access TokenRogue OAuth apps commonly abuse or exfiltrate tokens to maintain valid access.
Recommendation — Hunt for token abuse and map the app’s activity to suspicious API use.
NIST CSF 2.0PR.AA-4 — Identity and Access ManagementOAuth consent and token use are identity-assurance and access-control issues.
DE.CM-1 — Monitoring and Detection ProcessesDiscovery depends on spotting unusual app consent and API behaviour.
RS.AN-3 — Impact AnalysisTeams must determine what data or systems the rogue app could reach.
Recommendation — Apply identity controls to validate, revoke, and constrain application access. Monitor connected-app activity and alert on anomalous consent or API patterns. Analyze the accessed data, touched objects, and downstream impact of the compromise.

Practitioner Guidance

What to prioritise: Revoke the app first, then determine whether the token had read-only access or the ability to modify records, trigger workflows, or call downstream systems. That distinction drives the urgency of credential rotation and the breadth of the investigation.

What to verify: Confirm who approved the app, whether consent was admin-granted or user-granted, and whether the app’s scopes match its stated business purpose. If the approval path is unclear, treat the integration as untrusted until ownership is proven.

Escalation / exception: Escalate immediately if the app had offline access, bulk API permissions, or access to high-value objects such as customer records, security logs, or attached files. Those conditions materially increase the chance of data exfiltration and persistence.

Practitioner takeaway: The key decision is not whether the app looks familiar, but whether the granted token could still perform meaningful work; if it can, containment and scope review must come before business continuity concerns.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 8, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org