OAuth Attacks in Entra ID Can Leverage ChatGPT to Compromise User Email Accounts
## OAuth Consent Abuse in Microsoft Entra ID
OAuth Consent Abuse in Microsoft Entra ID
Recent investigations highlight an increasing trend of abuse in Microsoft Entra ID through OAuth consent abuse. This technique allows attackers to gain access to corporate users' email accounts without requiring their passwords.
OAuth, or Open Authorization , is a protocol that allows applications to access user data with permission. In Entra ID, users are presented with a consent prompt detailing requested permissions when connecting a third-party app. Threat actors exploit this by creating or disguising malicious applications that request sensitive permissions such as Mail.Read.
A case study identified by Red Canary involved a user, TestUser@ContosoCorp.onmicrosoft.com, consenting to OAuth permissions for a third-party application that appeared to be ChatGPT. Although this instance involved the legitimate OpenAI-owned ChatGPT, the procedure mirrored previous real-world attacks. The event was traced to IP address 3.89.177.26 on December 2, 2025, at 20:22:16 UTC.
The primary concern is not limited to specific applications like ChatGPT but extends to any third-party application that can gain the Mail.Read permission through user consent. This capability allows the application to silently access all messages in the user's inbox. Entra ID's default settings permit non-admin users to consent to applications, potentially exposing sensitive data.
Recent investigations highlight an increasing trend of abuse in Microsoft Entra ID through OAuth consent abuse.
When users connect an application via phishing or other means, two audit log events occur: "Add service principal" and "Consent to application," sharing a CorrelationId for traceability. Red Canary’s detection strategy focuses on identifying non-admin consent grants linked to new third-party applications with commonly abused OAuth scopes, such as Mail.Read, Files.Read.All, Chat.Read, and Sites.Read.All.
Upon confirming a malicious consent grant, revoke the OAuth permission using the grant ID from the audit log and remove the service principal using its object ID via Microsoft Graph PowerShell commands . Microsoft offers three consent policy options for prevention:
Administrator approval for all consent requests. Restriction to verified publishers with low-risk permissions. Automatic application of current user consent guidelines.
Based on reporting by Cyber Security News.
