T1589.002

Email Addresses

Adversaries may gather email addresses that can be used during targeting. Even if internal instances exist, organizations may have public-facing email infrastructure and addresses for employees. Adversaries may gather email addresses from publicly accessible sources such as social media, company websites, and leaked credential databases. Additionally, adversaries may actively enumerate valid email addresses by probing authentication services — for example, querying the Microsoft GetCredentialType API endpoint or Exchange Autodiscover to determine whether a given address is a valid account in Office 365 or on-premises Exchange environments. Gathered email addresses enable spearphishing campaigns, credential brute force attacks, business email compromise, and social engineering operations.

Microsoft Sentinel / Defender
kusto
// Detect Azure AD email address enumeration via sign-in log error analysis
// Error 50034 = UserAccountNotFound (username does not exist in tenant)
// Error 50126 = InvalidPasswordOrUsername (username exists but wrong credential)
// High ratio of 50034 errors with many unique UPNs from one IP = enumeration
let EnumerationThreshold = 10;
let TimeWindow = 1h;
SigninLogs
| where TimeGenerated > ago(24h)
| where ResultType in ("50034", "50053", "50055", "50056")
| where isnotempty(IPAddress)
| summarize
    UniqueUsernames = dcount(UserPrincipalName),
    AttemptCount = count(),
    UsernameSample = make_set(UserPrincipalName, 25),
    AppList = make_set(AppDisplayName, 10),
    Earliest = min(TimeGenerated),
    Latest = max(TimeGenerated)
    by IPAddress, ClientAppUsed, UserAgent, bin(TimeGenerated, 1h)
| where UniqueUsernames >= EnumerationThreshold
| extend DurationMinutes = datetime_diff('minute', Latest, Earliest) + 1
| extend EnumerationRatePerMin = round(toreal(UniqueUsernames) / toreal(DurationMinutes), 2)
| extend Verdict = case(
    UniqueUsernames >= 50, "High Confidence Enumeration",
    UniqueUsernames >= 20, "Moderate Enumeration",
    "Low-Level Enumeration"
)
| project TimeGenerated, IPAddress, ClientAppUsed, UserAgent, UniqueUsernames, AttemptCount, EnumerationRatePerMin, DurationMinutes, AppList, UsernameSample, Verdict, Earliest, Latest
| sort by UniqueUsernames desc
medium severity medium confidence

Data Sources

Azure Active Directory: Sign-in Logs Cloud Service: Cloud Service Authentication Microsoft Sentinel: SigninLogs table

Required Tables

SigninLogs

False Positives

  • Misconfigured identity federation or SSO systems repeatedly probing with malformed UPN formats across many users during bulk authentication failures
  • Penetration testing engagements against the tenant's Office 365 environment using legitimate enumeration tooling
  • Automated user provisioning or deprovisioning workflows that check account existence before creating or removing accounts, generating bursts of 50034 errors
  • Password reset portal integrations or helpdesk tools that validate email addresses against Azure AD at scale during employee onboarding events
  • Load-testing or integration testing of authentication flows using test email addresses that do not exist in the tenant

Unlock Pro Content

Get the full detection package for T1589.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections