Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

How Do You Audit OAuth App Consents?

An OAuth consent hands an application standing access to mail, files, and chat without a password. Auditing consents means listing every application, reading its permissions, and removing what nobody can justify.

Illustration for the cybersecurity term OAuth App Consent Auditing
Home / Blog / Cybersecurity Terms / How Do You Audit OAuth App Consents?
17 November 2026

How Do You Audit OAuth App Consents?

How Do You Audit OAuth App Consents?

When a user clicks “Accept” on an application’s permission request, they issue an OAuth consent: a standing grant that lets that application call Microsoft Graph or the Google APIs on their behalf, using refresh tokens rather than a password. Auditing consents means producing a full inventory of which applications hold which permissions over whose data, judging each one, and revoking the rest. It matters because a consent is unaffected by a password reset and, in most configurations, unaffected by multi-factor authentication once granted.

Why Attackers Prefer Consent to Credentials

An illicit consent grant attack skips the hard parts of account takeover. The victim is sent to a legitimate Microsoft or Google sign-in page — the URL and the certificate are genuine — and is asked to approve an application with an unremarkable name. There is no credential to phish, no second factor to intercept, and no anomalous sign-in to detect, because the attacker never signs in as the user at all.

The pattern has a long history. On 3 May 2017 a worm posing as Google Docs spread through roughly a million Google accounts in an hour by requesting mailbox and contacts scopes. In April 2022, stolen OAuth tokens issued to the Heroku and Travis CI integrations were used to clone private repositories from GitHub customers. And in the intrusion Microsoft disclosed in January 2024, the attackers pivoted from a legacy non-production tenant by granting a malicious application the full_access_as_app role over Exchange Online, then read corporate mailboxes with it. In every case the access was an application permission, not a stolen password.

Delegated Versus Application Permissions

The distinction decides how dangerous a grant is.

DelegatedApplication
Acts asThe signed-in userItself, with no user
Scope limitWhat that user can reachEverything the permission covers, tenant-wide
ConsentUser or administratorAdministrator only
ExampleMail.Read for one mailboxMail.ReadWrite for every mailbox

Application permissions such as Mail.ReadWrite, Files.ReadWrite.All, Directory.ReadWrite.All, and RoleManagement.ReadWrite.Directory deserve individual justification and an owner. Treat offline_access as significant too: it is what turns a one-off approval into persistent access through refresh tokens.

Running the Audit

  1. Inventory. In Entra ID, list every enterprise application and its service principals, together with the OAuth2 permission grants and app role assignments attached to each. The Microsoft Graph PowerShell SDK produces a far more usable export than the portal. In Google Workspace, use the app access control page under security settings to list connected applications and their scopes.
  2. Classify by blast radius. Sort by permission severity first, not by user count. One unused application with tenant-wide mailbox write access outranks fifty applications reading calendars.
  3. Check the publisher. Look for a verified publisher, a plausible reply URL, and a creation date that matches a business event. Applications registered in your own tenant by an ordinary user, with no owner and a generic name, are the classic indicator of abuse.
  4. Check the activity. Sign-in logs for service principals show whether the application has been used, and from where. A grant that has never been exercised is usually safe to remove; one being exercised from an unexpected country is an incident.
  5. Revoke and record. Removing the service principal removes the grant. For a suspected compromise, also revoke refresh tokens for affected users, because an issued access token remains valid until it expires.

Preventing the Next One

Auditing is remedial. The durable fix is to stop unrestricted user consent. In Entra ID, set user consent to allow only verified publishers requesting low-impact permissions, and enable the admin consent request workflow so legitimate requests reach an administrator rather than being refused silently. Google Workspace supports the same shape of control through app access restrictions and an allow list of trusted applications. Both platforms will flag suspicious applications automatically when the relevant detection features are licensed, and those alerts should route to your security operations centre rather than to an unread mailbox.

Build the review into a cycle: monthly for new grants, quarterly for the full inventory, and immediately after any phishing campaign that reached inboxes. This sits naturally alongside wider SaaS security posture management and your Microsoft 365 configuration baseline, and it is one of the few controls that directly addresses shadow IT, since every self-service SaaS tool a user adopts leaves a consent record behind.

Under UK GDPR, an application reading mailboxes is processing personal data, usually without a contract under Article 28. That makes the consent inventory a data protection artefact as much as a security one.

FAQ – Frequently Asked Questions

Does Revoking a Consent Immediately Cut Off Access?

Not quite. Deleting the service principal or the grant prevents new tokens from being issued, but an access token already in the attacker’s hands stays valid until it expires, typically within an hour. For a confirmed compromise, revoke refresh tokens and sign-in sessions for the affected users as well, then watch service principal sign-in logs to confirm the activity has stopped.

Should We Block User Consent Entirely?

Blocking it outright is the safest setting but creates friction that pushes people towards unmanaged alternatives. The middle path works better: allow consent only for applications from verified publishers requesting low-impact permissions, and enable the admin consent request workflow so users can ask for anything else. Respond to those requests quickly, or the policy will be worked around.

How Do I Spot a Malicious Application in the List?

Look for an application registered inside your own tenant by a standard user, with no listed owner, no verified publisher, a generic or lookalike name, a reply URL pointing at an unfamiliar domain, and permissions far wider than its stated purpose. A creation timestamp that lines up with a phishing wave is strong corroboration. Never-used grants and heavily used unknown grants both warrant investigation.

Do Consents Bypass Multi-Factor Authentication?

Effectively, yes, after the initial approval. The user completes authentication once, including any second factor, and the application then uses refresh tokens for ongoing access without further prompts. Conditional access policies can be scoped to applications, and continuous access evaluation shortens the window after a revocation, but a granted consent should be treated as access that survives your authentication controls.

Related Terms

You May Be Interested In These

What Is Atomic Red Team?

Cybersecurity Terms

17 November 2026

What Is Atomic Red Team?

Read More
What Is a Bug Bounty Programme?

Cybersecurity Terms

17 November 2026

What Is a Bug Bounty Programme?

Read More
What Is Confidential Computing?

Cybersecurity Terms

17 November 2026

What Is Confidential Computing?

Read More