First Time Seen Google Workspace OAuth Login from Third-Party Application

Last updated 11 days ago on 2026-06-15
Created 3 years ago on 2023-03-30

About

Detects the first time a user authorizes a third-party Google OAuth application that requests identity or sign-in scopes. Adversaries may abuse compromised credentials or phishing-linked consent flows to register novel OAuth clients, obtain refresh tokens, and authenticate as valid users while evading password-only detections.
Tags
Domain: CloudData Source: Google WorkspaceTactic: Defense EvasionTactic: Initial AccessTactic: PersistenceLanguage: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Defense Evasion (TA0005)(external, opens in a new tab or window)

Initial Access (TA0001)(external, opens in a new tab or window)

Persistence (TA0003)(external, opens in a new tab or window)

False Positive Examples
Developers may leverage third-party applications for legitimate purposes in Google Workspace such as for administrative tasks.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
New Terms Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-google_workspace.token-*
Related Integrations

google_workspace(external, opens in a new tab or window)

Query
text code block:
data_stream.dataset: "google_workspace.token" and event.action: "authorize" and google_workspace.token.scope.value: (*openid* or *userinfo.email* or *userinfo.profile* or *Login*) and google_workspace.token.client.id: *apps.googleusercontent.com

Install detection rules in Elastic Security

Detect First Time Seen Google Workspace OAuth Login from Third-Party Application in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).