Azure AD STS logon events

OperationDescriptionSampleRule
anyCatch-all for M365-AzureActiveDirectoryStsLogon rules matching the RecordType but no specific Operation.NY
PasswordLogonInitialAuthUsingPasswordA user authenticated to Azure AD STS using a password as the initial credential, before any MFA step.NY
UserLoggedInA user account authenticated against the Microsoft Entra ID Secure Token Service (STS). The schema defines RecordType 15 as STS logon events without restricting them to interactive sign-ins, so do not read this event as covering interactive logons only; a successful UserLoggedIn record also does not by itself mean the user went on to access any resource. First-party capture confirms it logs under AzureActiveDirectoryStsLogon (RecordType 15), not AzureActiveDirectory (RecordType 8).YY
UserLoginFailedA user sign-in attempt failed; first-party capture confirms it logs under AzureActiveDirectoryStsLogon (RecordType 15), not AzureActiveDirectory (RecordType 8).YY

any: Azure AD STS logon events (catch-all)

#
RecordType
AzureActiveDirectoryStsLogon

Description

Catch-all for M365-AzureActiveDirectoryStsLogon rules matching the RecordType but no specific Operation.

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
csUserAgent (kusto rule field)is_not_null1 rulekusto

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Kusto #

  • Malformed user agent source medium: Malware authors will sometimes hardcode user agent string values when writing the network communication component of their malware. Malformed user agents can be an indication of such malware.T1071, T1189, T1203

PasswordLogonInitialAuthUsingPassword

#
RecordType
AzureActiveDirectoryStsLogon

Description

A user authenticated to Azure AD STS using a password as the initial credential, before any MFA step.

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
EventType (elastic rule field)inpasswordlogoninitialauthusingpassword2 ruleselastic
EventType (elastic rule field)inuserloginfailed2 ruleselastic
Provider_Name (elastic rule field)inazureactivedirectory2 ruleselastic
Provider_Name (elastic rule field)inexchange2 ruleselastic
m365::Target.Type (elastic rule field)in02 ruleselastic
m365::Target.Type (elastic rule field)in102 ruleselastic
m365::Target.Type (elastic rule field)in22 ruleselastic
m365::Target.Type (elastic rule field)in62 ruleselastic
Esql.event_count (elastic rule field)ge101 ruleelastic

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Elastic #

UserLoggedIn

#
RecordType
AzureActiveDirectoryStsLogon

Description

A user account authenticated against the Microsoft Entra ID Secure Token Service (STS). The schema defines RecordType 15 as STS logon events without restricting them to interactive sign-ins, so do not read this event as covering interactive logons only; a successful UserLoggedIn record also does not by itself mean the user went on to access any resource. First-party capture confirms it logs under AzureActiveDirectoryStsLogon (RecordType 15), not AzureActiveDirectory (RecordType 8).

Example Audit Record #

{
  "Actor": [
    {
      "ID": "11111111-1111-1111-1111-111111111111",
      "Type": 0
    },
    {
      "ID": "adminuser@example.onmicrosoft.com",
      "Type": 5
    }
  ],
  "ActorContextId": "00000000-0000-0000-0000-000000000001",
  "ActorIpAddress": "203.0.113.10",
  "ApplicationId": "fb78d390-0c51-40cd-8e17-fdbfab77341b",
  "AzureActiveDirectoryEventType": 1,
  "ClientIP": "203.0.113.10",
  "CreationTime": "2026-07-02T15:29:47Z",
  "DeviceProperties": [
    {
      "Name": "OS",
      "Value": "Linux"
    },
    {
      "Name": "BrowserType",
      "Value": "Firefox"
    },
    {
      "Name": "IsCompliant",
      "Value": "False"
    },
    {
      "Name": "IsCompliantAndManaged",
      "Value": "False"
    },
    {
      "Name": "SessionId",
      "Value": "0022840a-e4ab-884c-587f-d20d24637227"
    }
  ],
  "ErrorNumber": "0",
  "ExtendedProperties": [
    {
      "Name": "ResultStatusDetail",
      "Value": "Success"
    },
    {
      "Name": "UserAgent",
      "Value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"
    },
    {
      "Name": "RequestType",
      "Value": "Cmsi:Cmsi"
    }
  ],
  "Id": "c9b63ef0-aa6e-4042-886d-75a46ac31000",
  "InterSystemsId": "fe1336ca-2296-44cf-9fd2-e4f912dc1aa1",
  "IntraSystemId": "c9b63ef0-aa6e-4042-886d-75a46ac31000",
  "ObjectId": "00000002-0000-0ff1-ce00-000000000000",
  "Operation": "UserLoggedIn",
  "OrganizationId": "00000000-0000-0000-0000-000000000001",
  "RecordType": 15,
  "ResultStatus": "Success",
  "Target": [
    {
      "ID": "00000002-0000-0ff1-ce00-000000000000",
      "Type": 0
    }
  ],
  "TargetContextId": "00000000-0000-0000-0000-000000000001",
  "UserId": "adminuser@example.onmicrosoft.com",
  "UserKey": "11111111-1111-1111-1111-111111111111",
  "UserType": 0,
  "Version": 1,
  "Workload": "AzureActiveDirectory"
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
EventType (elastic rule field)equserloggedin6 ruleselastic
security_result.action (Chronicle)eqALLOW6 ruleschronicle
m365::UserId (elastic rule field)is_not_null3 ruleselastic
target.resource.product_object_id (Chronicle)eq1b730954-1685-4b74-9bfd-dac224a7b8943 ruleschronicle
Provider_Name (elastic rule field)eqazureactivedirectory2 ruleselastic
m365::ApplicationId (elastic rule field)in00b41c95-dab0-4487-9791-b9d2c32c80f22 ruleselastic
m365::ApplicationId (elastic rule field)in04b07795-8ddb-461a-bbee-02f9e1bf7b462 ruleselastic
m365::ApplicationId (elastic rule field)in0ec893e0-5785-4de6-99da-4ed124e5296c2 ruleselastic
m365::ApplicationId (elastic rule field)in1950a258-227b-4e31-a9cf-717495945fc22 ruleselastic
m365::ApplicationId (elastic rule field)in1fec8e78-bce4-4aaf-ab1b-5451cc3872642 ruleselastic
m365::ApplicationId (elastic rule field)in22098786-6e16-43cc-a27d-191a01a1e3b52 ruleselastic
m365::ApplicationId (elastic rule field)in26a7ee05-5602-4d76-a7ba-eae8b7b679412 ruleselastic
m365::ApplicationId (elastic rule field)in27922004-5251-4030-b22d-91ecd9a37ea42 ruleselastic
m365::ApplicationId (elastic rule field)in2d7f3606-b07d-41d1-b9d2-0d0c9296a6e82 ruleselastic
m365::ApplicationId (elastic rule field)in4813382a-8fa7-425e-ab75-3b753aab3abb2 ruleselastic

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Sigma #

Elastic #

  • M365 Identity OAuth Flow by First-Party Microsoft App from Multiple IPs source high: Identifies sign-ins on behalf of a principal user to the Microsoft Graph or legacy Azure AD API from multiple IPs using first-party Microsoft applications from the FOCI (Family of Client IDs) group. Developer tools like Azure CLI, VSCode, and Azure PowerShell accessing these resources from multiple IPs are flagged, along with any FOCI application accessing the deprecated Windows Azure Active Directory from multiple IPs. This behavior may indicate an adversary using a phished OAuth authorization code or refresh token, as seen in attacks like ConsentFix where attackers steal localhost OAuth codes and replay them from attacker infrastructure.T1078, T1078.004, T1528, T1550, T1550.001, T1566
  • M365 Identity Login from Atypical Region source medium: Detects successful Microsoft 365 portal logins from a country and region the user has not previously authenticated from in a specific time window. Atypical regions are identified by combining the user's country and region geolocation history; an authentication from a new country/region pair for that user may indicate an adversary attempting to access the account from an unusual location or behind a VPN.T1078, T1078.004
  • M365 Identity Login from Impossible Travel Location source medium: Detects successful Microsoft 365 portal logins from impossible travel locations. Impossible travel locations are defined as two different countries within a short time frame. This behavior may indicate an adversary attempting to access a Microsoft 365 account from a compromised account or a malicious actor attempting to access a Microsoft 365 account from a different location.T1078, T1078.004

Splunk #

YARA-L #

UserLoginFailed

#
RecordType
AzureActiveDirectoryStsLogon

Description

A user sign-in attempt failed; first-party capture confirms it logs under AzureActiveDirectoryStsLogon (RecordType 15), not AzureActiveDirectory (RecordType 8).

Example Audit Record #

{
  "Actor": [
    {
      "ID": "11111111-1111-1111-1111-111111111111",
      "Type": 0
    },
    {
      "ID": "adminuser@example.onmicrosoft.com",
      "Type": 5
    }
  ],
  "ActorContextId": "00000000-0000-0000-0000-000000000001",
  "ActorIpAddress": "203.0.113.10",
  "ApplicationId": "12128f48-ec9e-42f0-b203-ea49fb6af367",
  "AzureActiveDirectoryEventType": 1,
  "ClientIP": "203.0.113.10",
  "CreationTime": "2026-07-02T15:44:44Z",
  "DeviceProperties": [
    {
      "Name": "OS",
      "Value": "Linux"
    },
    {
      "Name": "BrowserType",
      "Value": "Firefox"
    },
    {
      "Name": "IsCompliant",
      "Value": "False"
    },
    {
      "Name": "IsCompliantAndManaged",
      "Value": "False"
    },
    {
      "Name": "SessionId",
      "Value": "0022840a-e4ab-884c-587f-d20d24637227"
    }
  ],
  "ErrorNumber": "50199",
  "ExtendedProperties": [
    {
      "Name": "ResultStatusDetail",
      "Value": "Success"
    },
    {
      "Name": "UserAgent",
      "Value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"
    },
    {
      "Name": "RequestType",
      "Value": "Login:reprocess"
    }
  ],
  "Id": "c2d3606b-8392-481a-a571-d3a63f701000",
  "InterSystemsId": "3e459115-c228-4fd9-aa4a-b8af7572a0e0",
  "IntraSystemId": "c2d3606b-8392-481a-a571-d3a63f701000",
  "LogonError": "CmsiInterrupt",
  "ObjectId": "00000003-0000-0000-c000-000000000000",
  "Operation": "UserLoginFailed",
  "OrganizationId": "00000000-0000-0000-0000-000000000001",
  "RecordType": 15,
  "ResultStatus": "Success",
  "Target": [
    {
      "ID": "00000003-0000-0000-c000-000000000000",
      "Type": 0
    }
  ],
  "TargetContextId": "00000000-0000-0000-0000-000000000001",
  "UserId": "adminuser@example.onmicrosoft.com",
  "UserKey": "11111111-1111-1111-1111-111111111111",
  "UserType": 0,
  "Version": 1,
  "Workload": "AzureActiveDirectory"
}

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
ErrorNumber (splunk rule field)eq501262 rulessplunk
EventType (elastic rule field)inpasswordlogoninitialauthusingpassword2 ruleselastic
EventType (elastic rule field)inuserloginfailed2 ruleselastic
Provider_Name (elastic rule field)inazureactivedirectory2 ruleselastic
Provider_Name (elastic rule field)inexchange2 ruleselastic
failed_attempts (splunk rule field)gt102 rulessplunk
m365::Target.Type (elastic rule field)in02 ruleselastic
m365::Target.Type (elastic rule field)in102 ruleselastic
m365::Target.Type (elastic rule field)in22 ruleselastic
m365::Target.Type (elastic rule field)in62 ruleselastic
record_type (splunk rule field)eqazureactivedirectorystslogon2 rulessplunk
Esql.event_count (elastic rule field)ge101 ruleelastic
ResultStatus (splunk rule field)eqsuccess1 rulesplunk
count (splunk rule field)ge51 rulesplunk
uniqueIPs (splunk rule field)gt201 rulesplunk

Detection Rules #

Full rule details for this event, including ATT&CK technique mappings and native queries →

Elastic #

Splunk #

Panther #

References #

M365 audit records use different field names on each surface #

The same Unified Audit Log record uses different field names on each surface. A query built for one surface can silently miss on another. These pages document the Management Activity API JSON names, the same names Search-UnifiedAuditLog and the Office 365 Management Activity API return.

  • Purview CSV export flattens each record to four columns (CreationDate, UserIds, Operations, AuditData). The API field names live only inside the AuditData JSON blob. Expand it with ConvertFrom-Json. The wrapper columns are renamed too: CreationDate not CreationTime, UserIds not UserId, Operations not Operation.
  • Sentinel's OfficeActivity table renames several fields and turns two integer enum columns into strings. The table below maps them.
API JSON (event pages)OfficeActivity columnNote
IdOfficeIdRenamed.
WorkloadOfficeWorkloadRenamed.
ObjectIdOfficeObjectIdRenamed.
CreationTimeTimeGeneratedRenamed. OfficeActivity has no CreationTime column.
SiteUrlSite_UrlRenamed (SharePoint family).
RecordTypeRecordTypeSame name; the Int32 enum becomes its string enum name.
UserTypeUserTypeSame name; the Int32 enum becomes a string.
ClientIPClientIP, Client_IPAddressBoth columns present on OfficeActivity.
Scope(none)No OfficeActivity equivalent under any name. Recover it from the API JSON or the Purview AuditData blob.
Operation, UserId, ResultStatus, UserKey, AppAccessContext, OrganizationIdsame namesUnchanged. No _s / _d suffixes (a native table, not a custom log).

Mapping verified against the OfficeActivity table reference, the Management Activity API schema, and the Purview audit-record export format.