How to secure connected apps and OAuth connections in Salesforce

This guide walks Salesforce professionals and security teams through the exact connected app settings, policies, and monitoring steps needed to block attack paths that hackers exploit today.

If you’ve read about recent Salesforce data breaches, you’ve seen how threat actors exploited connected apps to bypass cyber defenses, steal CRM data, and even pivot into systems like Microsoft 365, Okta, and Workplace.

These weren’t highly sophisticated or complex attacks, but simply the result of misconfigured OAuth settings, weak app approvals, and gaps in monitoring. Threat actors understood the weaknesses, and used social engineering to take advantage of them – and especially human error.

In this article, we plainly list the concrete counter measures against OAuth abuse. No frills.

How to secure connected apps and OAuth connections against social engineering attacks

Here’s how Salesforce admins and security teams can lock down connected apps now.

1. Limit OAuth scopes to the bare minimum

  • Grant only the scopes the app truly needs — often just api.
  • Avoid avoid ‘full access’ scopes at all cost.
  • Rotate or expire refresh tokens to block long-term access abuse.
  • Check out Salesforce guide: OAuth tokens & scopes

Why: Smaller scope means smaller blast radius if an app is compromised.

2. Restrict who can authorize connected apps in Salesforce

Why: Prevents attackers from socially engineering standard users into installing malicious OAuth apps.

3. Enforce MFA and high-assurance sessions for connected apps

Why: Even if credentials are phished, tokens can’t be issued without MFA verification.

4. Use dedicated integration user accounts

  • Assign each external app its own Salesforce user account.
  • Apply least privilege through permission sets.
  • Monitor activity per integration for faster incident response.

Why: Makes logs clear, revocation easy, and scope tight.

5. Monitor and revoke suspicious OAuth access

  • Watch for bulk data exports, unusual API spikes, or new connected app authorizations.
  • Revoke suspicious tokens immediately via Setup → Connected Apps OAuth Usage.

Why: Real-time monitoring helps detect and stop ongoing abuse before data leaves your org.

6. Advanced session and token controls

Why: These measures reduce the attack surface, shorten the blast radius, and make it far harder for attackers to persist once inside.

Salesforce connected app security: the bottom line

The “malicious Data Loader” style attacks didn’t rely on a Salesforce zero-day. They exploited misconfigured OAuth settings, the way connected apps are trusted, and plain human error.

The basics go a long way: minimize scopes, restrict who can authorize apps, enforce MFA, and actively monitor OAuth activity. That playbook alone blocks most of what we’ve seen in the wild.

But if you want to really cut down your risk, the “more advanced” measures matter. Our seasoned Salesforce Architect Tapas Tripathi highlights the importance of shorter session timeouts, refresh token rotation, API access controls, and PKCE all shrink the window an attacker can operate in. Or better yet, close it altogether.

Securing connected apps aims to reduce the opportunities attackers have to turn a single click or code entry into full API access – one that opens the door for data theft and fraudulent actions.

At the end of the day, tighter controls are what prevents breaches.

Required field.

Please enter a valid business email address.

Invalid field.

Required field.

Enter your first and last name, separated by a space.

Required field.

Invalid field.

Required field.

Invalid field.

Phone number can only contain numbers, spaces, and these special characters: + () -.

Required field.

Invalid field.

We process the personal data you share with us in accordance with our Corporate Business Privacy Policy.