PlaybookLast checked 16 October 2026 with AI-assisted research. Editor: Akshay Dubey.MethodologyCorrections log

Organisations connect SaaS products to each other: a sales tool that writes to the CRM, a chat bot that reads files, a scheduling app that reads every calendar. Each connection is a non-human identity, and each one is usually authorised through an OAuth consent screen that a single user clicked through. This playbook covers how to find those integrations, decide who owns them, limit what they can reach, and remove them when they are no longer needed.

Identity, grant and token: three different things

Using this site's taxonomy, keep three things apart:

  • The identity is the record by which the platform knows the integration: a service principal or enterprise app in Microsoft Entra ID, an OAuth client in Google Workspace, an app with a bot user in Slack, a connected app in Salesforce.
  • The grant is the authorisation: the scopes a user or administrator consented to. It decides what the identity may do.
  • The credentials are the access and refresh tokens (and sometimes a client secret) that prove the identity on each call. They are credentials held by the identity. In many SaaS-to-SaaS integrations the refresh token is stored by the vendor of the integration, not by you.

The distinction matters in practice. Governance (owner, purpose, review) attaches to the identity. Least privilege attaches to the grant. Rotation and revocation attach to the tokens. A review that only lists apps, without their grants and without knowing who holds the tokens, misses two of the three.

Why this matters: the Drift case

Our Salesloft Drift case study describes the pattern. According to Google Threat Intelligence Group, an actor used OAuth tokens taken from Drift's environment to query and export data from customers' Salesforce instances between 8 and 18 August 2025. Salesloft and Salesforce revoked all Drift access and refresh tokens on 20 August 2025. The customers did not lose a password. They lost control of a credential that a third party held on their behalf, and the set of victims was decided by who had installed the integration.

MITRE ATT&CK describes the two halves of this pattern as T1528, Steal Application Access Token, and T1550.001, Application Access Token. T1528 also covers the reverse route: an attacker registers a malicious OAuth app and persuades a user to consent to it.

Step 1: Build the inventory from the platforms, not from memory

Each platform keeps its own record of connected apps and grants. Pull from each one rather than asking teams what they use.

  • Microsoft Entra ID. Enterprise applications list the service principals in the tenant. Delegated grants are stored as oauth2PermissionGrants and application permissions as appRoleAssignments, as Microsoft's page on reviewing permissions granted to applications explains. Both need to be read.
  • Google Workspace. The Admin console API controls show configured apps, accessed apps and apps pending review, per organisational unit (Google, Control which apps access Google Workspace data).
  • Slack. The admin Apps and workflows area lists installed apps. Each app's scopes are split into bot scopes, which act as the app's own bot user, and user scopes, which act on behalf of the person who authorised it (Slack, Scopes).
  • Other SaaS. CRM, code hosting, ticketing and storage platforms usually have their own connected-app or integration lists. Include them, because the Drift tokens were for Salesforce, not for the identity provider.

For each integration record: the platform, the app name and publisher, who consented and when, whether consent was by a user or tenant-wide, the scopes, the last time it was used if the platform shows it, and whether the integration's tokens are held by a vendor. The cross-platform discovery queries cover the cloud and code side of the same exercise.

The script below is a starting point for the Entra part. It lists delegated grants made for all users of the tenant.

#!/usr/bin/env bash
# List tenant-wide delegated OAuth grants (consentType "AllPrincipals") in Microsoft Entra ID.
# Read-only. Needs: Azure CLI signed in with an account that can read the directory, curl, jq.
set -euo pipefail
token=$(az account get-access-token --resource-type ms-graph --query accessToken -o tsv)
url='https://graph.microsoft.com/v1.0/oauth2PermissionGrants'
printf 'clientId\tresourceId\tscope\n'
while [ -n "$url" ]; do
  page=$(curl -sS --fail -H "Authorization: Bearer $token" "$url")
  jq -r '.value[] | select(.consentType == "AllPrincipals") | [.clientId, .resourceId, .scope] | @tsv' <<<"$page"
  url=$(jq -r '."@odata.nextLink" // empty' <<<"$page")
done

Limits of this script. It reads delegated grants only. Application permissions (appRoleAssignments) and grants made by single users (consentType Principal) are not listed. clientId and resourceId are service principal object IDs, so you need a second lookup to show names. Microsoft notes that other authorisation systems, such as Exchange RBAC and Teams resource-specific consent, can also grant access and are not covered. We have checked the syntax (bash -n, jq) but have not run it against a live tenant.

Step 2: Give every integration an owner and a purpose

An integration with no owner is the SaaS form of an orphaned service account. For each entry, name a person who is accountable for it, the business process it supports, and the data it is meant to touch. Where the person who consented has left, the integration still works: OAuth grants usually survive the departure of the user who made them. Treat ownerless integrations as candidates for removal in step 6. Our ownership and attribution page sets out how to record owners.

The default on several platforms lets any user connect a third-party app. The platforms give administrators controls to change that:

  • Microsoft Entra ID. Microsoft recommends allowing user consent only for apps from verified publishers, and offers an admin consent workflow so users can request apps they cannot approve themselves (Microsoft, Configure how users consent to applications).
  • Google Workspace. For unconfigured third-party apps, administrators can choose to allow any app, allow only apps that request basic sign-in information, or not allow any. Apps can be set to Trusted, Specific Google data, Limited or Blocked, and services such as Gmail and Drive can be marked Restricted.
  • Slack. Workspace owners can turn on Require approved apps with Only allow pre-approved apps, and let members request apps for review (Slack, Manage app approval). By default, members can install apps without approval.

MITRE lists blocking end-user consent as a mitigation (M1021) for both T1528 and T1550.001, and for T1550.001 also limiting third-party apps to an approved list. In our reading, the practical aim is a short approval path: if approval takes weeks, people find workarounds.

Step 4: Right-size the grant

Review the scopes of each approved integration against its stated purpose. Questions to ask:

  • Does it act on its own (application permissions in Entra, bot scopes in Slack) or on behalf of users (delegated permissions, user scopes)? Application permissions in Entra are granted to the service principal and are not limited by any one user's access.
  • Does it ask for tenant-wide read of mail, files or messages when the use case needs one mailbox, one folder or one channel?
  • Does it ask for offline access (a refresh token) when it only acts while a user is present?

The IETF's RFC 9700, Best Current Practice for OAuth 2.0 Security (January 2025) says access tokens should be restricted to the minimum privileges needed, by audience and by scope. That is guidance for those who build OAuth systems. Customers can apply the same test when they approve an app. In Google Workspace, the Specific Google data setting lets an administrator limit an app to named scopes.

Step 5: Know who holds the tokens

For an integration between two SaaS products, the refresh token usually sits with the vendor of the integration. You cannot rotate it yourself, and you will not see it leak. Before approval, and at each review, ask the vendor:

  • where the tokens are stored and how they are protected;
  • whether refresh tokens rotate or are sender-constrained (RFC 9700 requires one of the two for public clients);
  • how quickly the vendor can revoke all customer tokens, and how you will be told;
  • which of its own systems and staff can read the tokens.

Record the answers with the inventory entry. This is a third-party risk question as much as an identity question, and our guide for procurement covers how to fold it into vendor review.

Step 6: Review on a cycle and remove cleanly

Set a review interval by risk, for example quarterly for tenant-wide grants and integrations with mail, file or CRM access, and yearly for low-scope apps. Remove integrations with no owner, no use, or no current purpose. Three platform details affect removal:

  • Revoking a permission in Entra does not stop users consenting again; Microsoft points to user consent settings to block that.
  • Microsoft's incident playbook advises disabling a malicious application rather than only deleting it, because a deleted app can return if another user consents again (Microsoft, App consent grant investigation).
  • In Slack, restricting an app that is already installed does not uninstall it; Slack says it may need to be removed separately.

The wider process for decommissioning and for NHI access reviews applies here too.

Step 7: Watch consent events and token use

Feed consent and integration events into your detection pipeline. In Microsoft 365, the audit activity Consent to application is the starting point that Microsoft's investigation playbook uses. MITRE's detection notes for T1550.001 include application tokens used to call APIs without an interactive login, often with unusual scopes. After a vendor discloses an incident, check data-access logs on your side for the vendor's integration across the window it gives. The NHI security operations playbook covers detection and response in more detail.

Mapping to the OWASP NHI Top 10

This is our mapping, not a statement by OWASP.

Risk (OWASP NHI Top 10 (2025))How it shows up for SaaS integrationsSteps above
NHI3 Vulnerable Third-Party NHIA vendor holding your refresh tokens is breached5, 7
NHI5 Overprivileged NHITenant-wide or read-all scopes for a narrow task3, 4
NHI7 Long-Lived SecretsRefresh tokens and client secrets that never expire4, 5
NHI1 Improper OffboardingIntegrations left connected after the owner or the use case is gone2, 6
NHI10 Human Use of NHIPeople using an integration's credentials for manual access2, 7

Frequently asked questions

Is an OAuth app a non-human identity?

Yes, in this site's taxonomy. The app is known to the platform as a service principal, OAuth client or bot user, which is an identity. The access and refresh tokens it uses are credentials held by that identity, and the consented scopes are its grant.

Should we block all user consent to third-party apps?

Microsoft, Google and Slack all let administrators restrict it, and MITRE lists blocking end-user consent as a mitigation for token theft. In our view a full block works only when there is a fast request and approval path; otherwise users route around it.

What do we do when an integration vendor reports a breach?

Revoke or disable the integration on your side, ask the vendor to confirm that all tokens are revoked, review data-access logs for the integration across the vendor's stated window, and rotate any secrets that could have been read through it. Our Drift case study shows the sequence.

What happened in the Salesloft Drift OAuth breach?

According to Google Threat Intelligence Group, an actor it tracks as UNC6395 used compromised OAuth tokens associated with the Salesloft Drift application to query and export data from customers' Salesforce instances from at least 8 to 18 August 2025. Salesloft, working with Salesforce, revoked all Drift access and refresh tokens on 20 August 2025. Customers lost control of credentials a third party held on their behalf, not a password.

Sources

  • OWASP Non-Human Identities Top 10 (2025), owasp.org
  • MITRE ATT&CK, T1528 Steal Application Access Token, attack.mitre.org
  • MITRE ATT&CK, T1550.001 Use Alternate Authentication Material: Application Access Token, attack.mitre.org
  • Microsoft, Configure how users consent to applications (last updated 24 June 2025), learn.microsoft.com
  • Microsoft, Review permissions granted to enterprise applications, learn.microsoft.com
  • Microsoft, App consent grant investigation (incident response playbook), learn.microsoft.com
  • Google Workspace Admin Help, Control which apps access Google Workspace data, knowledge.workspace.google.com
  • Slack, Scopes (developer documentation), docs.slack.dev
  • Slack Help Center, Manage app approval for your workspace, slack.com
  • IETF, RFC 9700, Best Current Practice for OAuth 2.0 Security (January 2025), datatracker.ietf.org
  • Google Threat Intelligence Group, Widespread Data Theft Targets Salesforce Instances via Salesloft Drift (26 August 2025), cloud.google.com
  • NHI Governance, Salesloft Drift OAuth token theft (2025), case study

Where a primary URL is not shown, we have not confirmed the figure against the publisher’s own document and say so on the page rather than linking a secondary source that paraphrases it. Paywalled standards (ISO/IEC, AICPA) are cited by clause and not linked. Corrections welcome: report an error.

Disclosure. This reference is free. No vendor pays for coverage, placement, or favourable treatment. HumanAudit Inc., which publishes this site, sells ISO/IEC 42001 documentation and plans NHI governance documentation packs, including an RFP kit that does not name, rank or recommend any vendor; it builds and sells no NHI scanner and no NHI discovery, monitoring or security tool (see About). Links to its offers appear in the header, in the site footer and in one marked box on guide pages; company profiles carry none. See our methodology, sourcing standards and corrections policy.

From the publisher

HumanAudit, which publishes this site, is preparing the NHI Governance pack: an NHI policy, ownership register, lifecycle procedures and one control set mapped, as our interpretation, to PCI DSS v4.0.1, ISO/IEC 27001:2022, NIS2 and DORA. Planned for March 2027; not yet on sale, and no price has been published.

Monthly change log

Know when the NHI landscape changes.

One email a month from this reference: new deals, standards status changes and corrections. No sponsored content. Unsubscribe from any email.

We first email you a link to confirm. Privacy policy.