A malicious OAuth app is a third-party application that gets access to a user’s email, files or other data through an OAuth consent grant instead of a stolen password. Tricking a user into approving one is called consent phishing, and the access it gives usually survives a password reset.
Ask most people how an attacker gets into a corporate account and they will describe a stolen password. But there is a quieter path that never touches the password at all: the malicious connected app. A user clicks “Allow,” grants a third-party application access to their email, files, or calendar through OAuth, and hands over standing access that survives password changes and often flies under the radar of the usual defenses. It is one of the more underappreciated risks in a cloud-first environment.
How connected apps work
Modern platforms, Google Workspace, Microsoft 365, and countless SaaS tools, let third-party applications connect to your account through OAuth. When you use a “Sign in with…” button or grant an app permission to your calendar or inbox, you are authorizing that application to act with some slice of your access, without ever giving it your password. Salesforce uses the same term, and an org’s connected apps and their OAuth scopes are part of every Salesforce penetration test we run. Vendors who publish their own app face a separate gate: the Salesforce security review tests the package, and any web endpoints the vendor runs outside Salesforce, before it can be listed.
This is genuinely useful; it powers the integrations people rely on daily. But it means access to an account is not governed by the password alone. It is also governed by whatever applications the user has connected, and by what those applications are permitted to do.
Where the risk comes from
Several properties make malicious or over-permissioned connected apps dangerous:
They bypass password defenses entirely. A connected app has its own access token. Changing the account password generally does not revoke it, and the detail differs by platform. Microsoft’s guidance on illicit consent grants says resetting passwords or requiring MFA is not effective against an app a user has consented to. Google documents that a password change stops a refresh token working only when the token contains Gmail scopes, so other grants carry on. Even multi-factor authentication, which protects the login, does nothing about an app that was already authorized. The usual account protections simply do not apply.
Permissions are often far broader than needed. Consent screens ask for scopes, “read your email,” “manage your files”, and users tend to click through without scrutinizing them. An app that needed to read one calendar may have been granted access to the entire mailbox. Attackers deliberately request broad scopes precisely because users approve them.
Access persists quietly. Once granted, a connected app keeps its access indefinitely unless someone explicitly revokes it. A malicious app can maintain a foothold for a long time, and because it is not a “login,” it often does not trip the monitoring tuned to watch for suspicious sign-ins.
The attack in practice
A common pattern is consent phishing. Instead of trying to steal a password, the attacker sends what looks like a legitimate request to connect an app, often impersonating a trusted service. The user, seeing a familiar-looking consent screen, clicks “Allow.” No credentials are stolen because none are needed; the user has just granted a hostile application ongoing access to their data. MITRE ATT&CK tracks the technique as Steal Application Access Token (T1528), and a consent phishing simulation shows how your own staff respond to it.
From there the app can quietly read email, download files, or harvest contacts, and it keeps doing so until someone notices and revokes it. Because nothing about it looks like a break-in, that can take a long time.
Real incidents that ran through OAuth access
- Microsoft, January 2024. Microsoft reported that the Midnight Blizzard group compromised a legacy test OAuth application with elevated access, created further malicious OAuth apps, and used an Exchange Online role that allows access to mailboxes to read corporate email.
- Salesloft Drift, August 2025. Google’s threat intelligence team reported that a group it tracks as UNC6395 used compromised OAuth tokens from the Drift app to take data from customers’ Salesforce instances from August 8 through at least August 18, 2025, until every Drift token was revoked on August 20.
In both cases the damage was done through an application’s standing access. The second is why connected app scopes are reviewed in a Salesforce test; our Salesforce penetration testing cost page shows what that covers.
Assessing the real impact
To understand the exposure, look past “an app has access” to what that access actually enables:
- What data can it reach? Read access to an executive’s inbox is a different order of risk than access to a limited calendar.
- Can it act, or only read? An app that can send mail or modify files can do active damage, not just observe.
- Whose account is it connected to? The same permissions are far more dangerous on a privileged or executive account.
- How long has it had access, and is anyone watching? Persistent, unmonitored access is where quiet, long-running compromise lives.
How to find risky OAuth apps in Microsoft 365 and Google Workspace
Microsoft 365. Microsoft’s guide to illicit consent grants, linked above, gives three places to look:
- In the Microsoft Defender portal, search the audit log for the activity Consent to application and check whether
IsAdminConsentis True, which indicates an administrator may have granted broad access to data. - In the Microsoft Entra admin center, open a user under Users, All users and select Applications to see each app that user has authorized and its permissions. Users can review their own at myapps.microsoft.com.
- For the whole tenant, export every grant with the PowerShell script the guide links, then look for non-Microsoft apps with tenant-wide consent and broad Read, Write or All permissions.
Consent abuse inside Entra ID is also part of what our guide to Azure penetration testing covers.
Google Workspace. In the Admin console go to Security, Access and data control, API controls, and open Manage App Access. It lists the third-party apps users have connected and lets you mark each one Trusted, Limited or Blocked, and set a default for unconfigured third-party apps.
High-risk scopes. On either platform, look first at any app that can read or send all mail, read or write all files, change directory or admin settings, or keep access while the user is offline. In Microsoft Graph those appear as permissions such as Mail.Read, Mail.Send, Files.ReadWrite.All and offline_access.
OAuth risk from AI assistants and connectors
AI assistants, agents and their connectors reach mailboxes, drives and CRMs through the same OAuth grants, and they are often given broad read scopes so the assistant can see everything. That adds a failure mode ordinary apps do not have: instructions hidden in an email or document can steer the assistant into using its legitimate token for an attacker. Our guide to agentic AI security explains the mechanism.
Treat every AI connector as a connected app. Review its scopes, prefer read-only and per-user grants over tenant-wide ones, and log what it does. Where the connector is a Model Context Protocol server, token audience and scope checks are covered in MCP server security testing.
Limiting the damage
Connected-app risk is manageable with deliberate controls:
- Govern app consent. Restrict which third-party apps users can authorize on their own, and require review or approval for anything requesting sensitive scopes; our Microsoft 365 security best practices and Google Workspace security checklist show where those settings live. In Microsoft Entra this is the user consent setting plus the admin consent workflow. It closes the most common consent-phishing route, because a user can no longer approve a risky app alone.
- Audit connected apps regularly. Review what is connected across your environment, what each can access, and revoke anything unrecognized, unused, or over-permissioned. Our Microsoft 365 security assessment includes this review for Microsoft 365 and Google Workspace tenants, from $4,200 (see Microsoft 365 assessment pricing).
- Enforce least privilege on scopes. Where you control the integrations, grant the minimum access needed, not the maximum offered.
- Monitor for suspicious consent activity. Watch for unusual app authorizations, especially broad-scope grants, the way you watch for suspicious logins. In Microsoft 365, alert on every Consent to application audit event that carries admin consent or mail and file scopes.
- Educate users about consent screens. People scrutinize password prompts but click through permission requests. Teach them that “Allow” can hand over as much as a password does.
The takeaway
Account security is not only about who knows the password. It is also about what applications have been invited in and what they are allowed to do. Malicious connected apps exploit a trust mechanism most organizations barely monitor, granting attackers persistent, password-independent access that standard defenses miss. Bring connected apps under the same scrutiny you apply to logins, and the path closes. If you want your Microsoft 365 or Google Workspace tenant, including its OAuth and integration exposure, assessed properly, our Microsoft 365 security assessment covers exactly this ground, and you can scope an engagement that includes it.
Frequently asked questions
How do I see which third-party apps can access our tenant?
In Microsoft 365, review the Consent to application events in the audit log and the Applications list for each user in the Microsoft Entra admin center, or export all grants with PowerShell. In Google Workspace, open Security, Access and data control, API controls, Manage App Access in the Admin console.
How do I revoke a malicious OAuth app’s access?
Remove the app’s grant, not the user’s password. In Microsoft Entra, open the affected user, select Applications, choose the app and select Remove. In Google Workspace, set the app to Blocked. Then review the audit log for what the app read while it had access.
Do AI assistants and MCP connectors create OAuth risk?
Yes. They hold OAuth grants like any connected app, often with broad read scopes, and a prompt injection can turn that legitimate access against you. Review their scopes the same way you review any third-party app.
Written by
Omar Khandaker, Senior Security Consultant
11+ years in the field. Focus: PCI DSS, ISO 27001, ISO 9001 & CMA. Part of the team that scopes, tests, and reports for our clients. Full profile →