VANDFORTBook a call
Every tool is free to use. Enter your email once and all five open.All resources

700+ Organizations Behind One Stolen Integration: OAuth Scopes and Private App Tokens, and What a Read-Only Salesforce and HubSpot Audit Actually Touches

A translucent glass key with only a few teeth, resting beside a glass lock on a pale white surface in warm gold light

The vendor's access request said "read-only." The admin opened the Salesforce consent screen, saw the app ask for api and refresh_token, and approved it. Nobody noticed that the label on api is "Manage user data via APIs," or that the user who authorized the app held the System Administrator profile. For the next quarter, a token everyone believed was read-only could edit, delete and export every record that admin could see, from any network. The scene is illustrative; the mechanics are documented, and they are why a Salesforce OAuth read only setup has to be built, not assumed.

700+organizations affected by the 2025 Salesloft Drift OAuth token theft (TechTarget, 2025)
677of 2,890 public OAuth apps requested permissions beyond their stated function (Offroad OhAuth, 2026)
30%of breaches involved a third party, double the prior year (Verizon DBIR, 2025)

The incidents of the last eighteen months were not exotic. TechTarget's September 2025 timeline of the Salesloft Drift campaign put the number of affected organizations above 700, and the attacker's tool was the integration's own OAuth tokens. In June 2025, Google's Threat Intelligence Group described a group it tracks as UNC6040 talking employees into authorizing a modified copy of Salesforce Data Loader, then exporting data through it. In November 2025, Salesforce revoked tokens tied to Gainsight's applications after suspicious API calls from non-allowlisted IP addresses, per Recorded Future. Verizon's 2025 Data Breach Investigations Report, built on 12,195 confirmed breaches, found third-party involvement had doubled to 30%.

Each of those is an integration problem before it is a security problem. The audit buyer's question is narrow: which object holds the read/write line, and what can the token reach on the day it leaks? Salesforce and HubSpot answer it in different places, so a "read-only" checkbox on a vendor questionnaire tells you almost nothing.


Where a Salesforce OAuth read only setup breaks

1. Treating the api scope as a read scope

Salesforce OAuth scopes decide which surfaces a token can call, not which verbs. The Mobile SDK scope reference describes api as access to "the current, logged-in user's account using APIs, such as REST API and Bulk API 2.0," and full as access to "all data accessible by the logged-in user." None of the listed scopes is read-only. Salesforce's own architecture guidance says it plainly: "Scopes define what an external application is allowed to do, but they don't replace the user security model." What the token can do to an Opportunity is decided by the running user's object permissions (Read, Create, Edit, Delete), field-level security and sharing. Read-only on Salesforce is a permission set, not a scope.

2. View All Data as the shortcut to "see everything"

Auditors want complete data, so the tempting fix for missing records is the View All Data permission. The Salesforce object reference describes it as letting a user "view all records regardless of sharing settings," and Modify All Data as the right to "read, edit, delete, transfer, and approve all records regardless of sharing settings." The first is read-only but unbounded; the second is not read-only at all. Instead, grant Read on each allowlisted object, set sharing so the integration user sees the population the audit measures, and use field-level security to hide fields the questions never touch; hidden fields are not returned by query or describe calls.

3. Reading configuration with a permission that can write it

A revenue audit maps automation as well as data: flows, assignment rules, validation rules. The trap is that Salesforce's Metadata API requires either Modify Metadata Through Metadata API Functions or Modify All Data, and the first is described as access to "access and edit metadata via Metadata API." A vendor who asks for that permission to read flow definitions is asking for a permission that can deploy changes to them. Keep configuration reads separate from data reads: have your admin retrieve the metadata and hand over the files, or grant the metadata permission to a separate, short-lived identity with its own end date.

4. HubSpot scopes that are wider than their names

HubSpot puts the verb in the scope, which is cleaner, but a few scopes reach further than they look. HubSpot's legacy scope reference describes crm.objects.contacts.read as "View properties and other details about contacts," while crm.objects.contacts.write adds "create, delete, and make changes." HubSpot's public-app guide also warns that a crm.objects.contacts.read token "can view all contacts in the account and not only those owned by the authorizing user." The automation scope, which covers workflows, has no read-only counterpart in that reference. crm.export exports records "for all CRM data types." And Enterprise accounts have separate Sensitive and Highly Sensitive read scopes that an audit rarely needs.

5. Tokens built to outlive the engagement

Salesforce labels refresh_token "Perform requests at any time," which is exactly what it does until a policy says otherwise. A HubSpot private app's access token does not expire on a schedule: HubSpot recommends rotating it every six months and reminds super admins after 180 days. Neither platform knows your audit ends in three weeks, and the 2025 incidents were long-lived tokens used by someone other than their owner.

The pattern: on Salesforce, read-only lives in the integration user's permission set and the app policy; on HubSpot, it lives in the scope list on the token. An audit that asks you to approve an app without showing you both, object by object, has not designed its access. It has inherited whatever the authorizing user happened to have.

Reference architecture

Five layers, each producing an artefact you can inspect, so anyone on your team can answer "what can this identity touch?" from configuration alone.

App registration · Default closed

Salesforce: as of the Spring '26 release, Salesforce calls External Client Apps "the primary way to define inbound external integrations," with a default-closed posture: the app cannot authenticate against your org unless it is defined there or installed by package. Existing connected apps keep working. Since September 2025, users without the Approve Uninstalled Connected Apps or Use Any API Client permission can no longer authorize uninstalled connected apps, the kind of self-authorization UNC6040's callers talked employees into. Set Permitted Users to "Admin approved users are pre-authorized," IP Relaxation to "Enforce IP restrictions," a short session timeout, a refresh token policy that expires unused tokens, and refresh token rotation.

HubSpot: a dedicated legacy private app (created only by a super admin, up to 20 per account), or a static-token app with Private distribution on the newer developer platform. One app per vendor, never a token shared with another tool.

Contract to identity: an app name, an owner on your team and an end date.

Identity · One user, no human login

Salesforce: a new user on the Salesforce Integration user license. Salesforce's admin guidance says the license provisions the Minimum Access – API Only Integrations profile with API Enabled and API Only set and not editable, so the user cannot log in through the UI. Enterprise, Unlimited and Performance editions include five of these licenses. Set login IP ranges on a copy of the profile.

HubSpot: the private app itself is the identity, and its scopes are its boundary. HubSpot warns that a contacts read scope sees every contact in the account, not only those owned by the authorizing user, so plan the scope list as if it reaches the whole portal.

Contract to scope: an identity that holds no permissions yet.

Permissions and scopes · Read on an allowlist

Salesforce: one permission set granting Read only on the objects the audit's questions need, field-level security trimmed to the fields those questions read, no View All Data, no Modify All Data, no metadata permission. Configuration arrives as exported files instead.

HubSpot: .read object scopes for the allowlist, the matching crm.schemas.*.read scopes for property definitions, crm.objects.owners.read to resolve owners, and nothing ending in .write. Exclude automation, crm.export, crm.import and the sensitive-data scopes unless a named finding depends on them.

Contract to extraction: a scope manifest, as below, signed off by your admin.

-- illustrative scope manifest, made-up org, 3-week audit
salesforce:
  app:        External Client App "Audit-2026Q4", admin pre-authorized
  user:       Integration user license, API only, login IP ranges set
  permset:    Read on Account, Contact, Lead, Opportunity,
              OpportunityHistory, Task, Event       (no Create/Edit/Delete)
  denied:     View All Data, Modify All Data, Modify Metadata
  tokens:     refresh token expires if unused 7 days; rotation on
hubspot:
  app:        private app "audit-2026q4"
  scopes:     crm.objects.{contacts,companies,deals}.read
              crm.schemas.{contacts,companies,deals}.read
              crm.objects.owners.read
  denied:     *.write, automation, crm.export, crm.import, *.sensitive.*
window:       2026-10-19 to 2026-11-09   owner: RevOps lead
Extraction · Snapshot once

Components: a bulk read through REST or Bulk API 2.0 on Salesforce and the CRM object APIs on HubSpot, inside HubSpot's per-app limits (100 requests per 10 seconds on Free and Starter, 190 on Professional and Enterprise), into an anonymized snapshot with an "as of" timestamp. Later steps read the snapshot, not the CRM.

Contract to analysis: snapshot ID, row counts per object, fields dropped or masked.

Evidence and teardown · Prove it, then revoke

Components: Salesforce's Connected Apps OAuth Usage page and the integration user's login history; HubSpot's private app call log, which covers 30 days and stores no request or response bodies for successful calls. At the end date, deactivate the integration user and revoke its tokens; in HubSpot, deleting the app permanently revokes its token.

Contract to you: a teardown record: what was revoked, when, and when the snapshot will be deleted.

Design principle: read-only should be readable from configuration. If your admin can open one permission set and one scope list and see every object the auditor can reach, with no verb beyond Read, the access is designed. If the answer depends on who clicked "Allow," it is not.

Build sequence

Start from the questions, not the vendor's default app

List what the audit must answer (response time, stage aging, duplicate rate) and derive objects and fields from that list. A packaged app's default scope request is an opening offer.

Register the app closed, then open it to one user

Create or install the Salesforce app with admin pre-authorization, IP enforcement and a refresh token policy, and assign it only to the integration user's permission set. In HubSpot, create the private app with the manifest's scopes and nothing else.

Try to write, and try to read too much

With the audit identity, attempt an update on a test record, query an object outside the allowlist and query a hidden field. All three should fail. Record the results.

Hand over configuration as files

Your admin retrieves the flows, rules and property definitions the audit needs and shares them, so no data identity ever holds a metadata or automation permission.

Extract once and disconnect

Pull the snapshot, anonymize it, and run every calculation on the copy. A second pull goes through the same manifest, not a quiet scope change.

Revoke on the date and check the logs

Revoke on the end date, confirm a test call fails, and check usage a week later. It should be silent.


Build vs. buy: trade-offs

Three ways an outside party usually gets CRM access for a diagnostic. Platform behaviour is as of October 2026; check current Salesforce and HubSpot documentation before you configure.

ApproachFitCost of ownershipFailure risk
Admin authorizes the vendor's app under their own userRarely right; common because it is the default flowMinutes to set up, no ongoing designThe token inherits every permission the admin holds, including edit and delete; it survives until someone revokes it
Vendor's packaged app with the scopes and permission set it shipsSoftware you will keep running, where its write actions are the pointLow setup; recurring review of what the package can reachScope creep by design; one compromised vendor reaches every customer, as Drift and Gainsight showed
Dedicated read-only identity, manifest, snapshot and teardownAny audit or one-time analysisAn hour or two of admin time at each endLowest; residual risk is the snapshot, handled by anonymization and a deletion date

Systems that act on the CRM need write access, narrow and gated, as governance for autonomous GTM agents describes. The one-identity-per-tool rule is the same one the Clay, Salesforce and Outreach reference architecture applies.


Running it in production

Monitor

Watch the audit identity like any integration. In Salesforce, the Connected Apps OAuth Usage page shows which apps are in use and by how many users; login history shows where the integration user signed in from. In HubSpot, the private app call log shows 30 days of calls. Where you have Salesforce Shield, Google's UNC6040 guidance adds alerts on large downloads.

Fail safe

Revocation should be one action. Because the auditor has its own user and its own app, blocking the app ends its sessions immediately and touches nothing else. Before granting access, search notes and case fields for pasted credentials.

Explain it to leadership

The auditors read the objects on this list, from their published IP range, for three weeks. We tested that writes fail before they started and revoked access on the end date. Their numbers come from a frozen copy, so we can reproduce every one.


Where this fits in the system

This is the access pattern behind VANDFORT's Revenue Engine Audit. The audit runs on read-only access to your CRM and revenue tooling for three weeks with zero changes to your systems: not a record, a workflow or a field. Data is anonymized before analysis, it does not train models, you keep a 30-day data room, and deletion is available on request. The fee is fixed, with no obligation to buy a build. The method follows the diagnose-before-you-build playbook; the snapshot pattern echoes the case for a revenue data warehouse.

The same discipline carries into the systems. Revenue Answers answers revenue questions from CRM data, so it gets its own read-only identity and manifest, never the auditor's. Systems among the ten systems that write get narrow write permissions for one job, after passing their test on your own past cases.

Frequently asked questions

Is there a read-only OAuth scope in Salesforce?

No. Salesforce scopes such as api, refresh_token and full control which APIs a token can call, not whether it can write. What the token can read or change comes from the authorizing user's profile, permission sets, field-level security and sharing. To make a Salesforce integration read-only, give a dedicated integration user Read permission only on the objects it needs, and nothing else.

What does the api scope allow in Salesforce?

It lets the app use the logged-in user's access through APIs such as REST API and Bulk API 2.0. Salesforce labels it "Manage user data via APIs." If that user can edit or delete records, so can the token. That is why the integration user's permissions, not the scope, decide whether access is read-only.

Can a HubSpot private app be read-only?

Yes, if every scope on it is a read scope. HubSpot separates scopes such as crm.objects.deals.read from crm.objects.deals.write. Watch the exceptions: automation has no read-only variant, crm.export exports all CRM data types, and a contacts read scope sees every contact in the account, not only those owned by the user who authorized it.

Do I need to give a consultant admin access to Salesforce?

Not for an audit. Salesforce's admin guidance calls the System Administrator profile a common vendor shortcut and recommends one integration user per integration with only the access it needs. Configuration the consultant must review can be exported by your admin, which avoids granting metadata permissions that can also deploy changes.

How do I check what a connected app or private app can access?

In Salesforce, open the app's OAuth policies and the permission sets assigned to its integration user, and review the Connected Apps OAuth Usage page. In HubSpot, open the private app's settings to see its scopes and its 30-day call log. If the answer is not visible there, the access was not designed.

Sources: TechTarget, Salesloft Drift timeline (September 2025). Offroad OhAuth via Help Net Security (June 2026). Verizon, 2025 DBIR (April 2025). Google Threat Intelligence Group, UNC6040 voice phishing report (June 2025). Recorded Future, Salesforce-Gainsight incident (November 2025). Salesforce developer docs: OAuth scopes, data access, Metadata API access (Winter '27). Salesforce Admins blog (August 2025; October 2025). Salesforce blog, External Client Apps (February 2026). HubSpot developer docs, scopes, public apps, private apps and the developer platform (accessed October 2026). VANDFORT, Revenue Engine Audit page (October 2026).

Read next