Skip to content
WETNav

Microsoft

Entra ID sign-in logs

Every interactive and non-interactive sign-in to Entra ID: who, from where, with which app, protocol and result code.

Why it matters

Identity is the front door in cloud intrusions. Sign-in logs show password spraying, MFA fatigue, device code phishing and token replay, and they are the only place to see where a stolen token was used afterwards.

How long it lasts

  • Entra ID Free: 7 days in the portal. P1 or P2: 30 days.
  • Keep longer by exporting with diagnostic settings to Log Analytics, a storage account or an event hub. Without that export, older sign-ins are gone.
  • Interactive and non-interactive sign-ins are separate categories. Token reuse after a phishing sign-in appears only in the non-interactive category.
Plan collection order across every source

Get the data

Connect-MgGraph -Scopes AuditLog.Read.All
Get-MgAuditLogSignIn -Filter "userPrincipalName eq '[email protected]' and createdDateTime ge 2026-01-01" -All |
  Select-Object createdDateTime, appDisplayName, ipAddress, clientAppUsed, @{n='errorCode';e={$_.Status.ErrorCode}}

Fields that matter

status.errorCodeSentinel: ResultType

0 for success, otherwise the AADSTS error. 50074/50076 mean the password was correct.

ipAddressSentinel: IPAddress

Source IP. Pair with location and the autonomous system to spot hosting providers and VPNs.

appId / appDisplayNameSentinel: AppId / AppDisplayName

The client application. Azure CLI and Azure PowerShell are common in token theft.

resourceDisplayNameSentinel: ResourceDisplayName

What was accessed: Exchange Online, Microsoft Graph, SharePoint.

clientAppUsedSentinel: ClientAppUsed

Browser, modern app, or a legacy protocol (IMAP, POP, SMTP) that cannot do MFA.

authenticationProtocolSentinel: AuthenticationProtocol

deviceCode and ropc are the values attackers abuse.

authenticationRequirementSentinel: AuthenticationRequirement

singleFactorAuthentication or multiFactorAuthentication.

incomingTokenTypeSentinel: IncomingTokenType

Whether a refresh token or primary refresh token was presented.

userAgentSentinel: UserAgent

Scripting libraries here (python-requests, aiohttp, Go-http-client) suggest tooling rather than a person.

deviceDetailSentinel: DeviceDetail

Device ID, OS, browser, and whether the device is compliant or managed.

correlationId / sessionIdSentinel: CorrelationId / SessionId

Tie the interactive sign-in to the token use that followed it.

conditionalAccessStatusSentinel: ConditionalAccessStatus

success, failure or notApplied; check appliedConditionalAccessPolicies for which policy acted.

Values to know

errorCode

All values

riskEventTypes_v2

All values

Traps

  • Many SIEMs ingest SigninLogs but not AADNonInteractiveUserSignInLogs to save cost. Device code and token theft cases are then half-blind.
  • A failed sign-in with 50074 or 50076 still means the password worked. Do not close it as 'MFA blocked it' without resetting the password.
  • Location is derived from IP and is often wrong for mobile carriers and cloud egress. Use the IP and ASN, not the city.
  • Sign-ins by service principals and managed identities are separate log categories again.

Playbooks that use it