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.
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
0 for success, otherwise the AADSTS error. 50074/50076 mean the password was correct.
Source IP. Pair with location and the autonomous system to spot hosting providers and VPNs.
The client application. Azure CLI and Azure PowerShell are common in token theft.
What was accessed: Exchange Online, Microsoft Graph, SharePoint.
Browser, modern app, or a legacy protocol (IMAP, POP, SMTP) that cannot do MFA.
deviceCode and ropc are the values attackers abuse.
singleFactorAuthentication or multiFactorAuthentication.
Whether a refresh token or primary refresh token was presented.
Scripting libraries here (python-requests, aiohttp, Go-http-client) suggest tooling rather than a person.
Device ID, OS, browser, and whether the device is compliant or managed.
Tie the interactive sign-in to the token use that followed it.
success, failure or notApplied; check appliedConditionalAccessPolicies for which policy acted.
Values to know
errorCode
All values- 50126Invalid username or passwordThe account exists and the password was wrong.Depends on context
- 50053Account locked or sign-in blockedSmart Lockout locked the account, or the sign-in came from an IP Entra ID flagged as malicious.Suspicious
- 50055Password expiredThe password is correct but has expired.Depends on context
- 50057Account disabledThe account is disabled.Suspicious
- 50074Strong authentication requiredThe password was correct, then MFA was required.High signal
- 50076MFA required (location or policy)The password was correct, then MFA was required because of policy or a new location.High signal
- 50079MFA registration requiredThe user must register for MFA before continuing.Depends on context
- 50072MFA enrollment requiredThe user must enroll a second factor.Depends on context
- 50125Password reset or registration interruptSign-in was interrupted by a password reset or registration flow.Depends on context
- 50158External security challenge not satisfiedAn external MFA provider or challenge was not completed.Depends on context
authenticationProtocol
All values- devicecodeDevice code flowThe user entered a code shown by another device or app to sign it in.High signal
- ropcResource Owner Password CredentialsThe app sent the username and password directly, without an interactive prompt.Suspicious
- authenticationtransferAuthentication transferSign-in transferred from another device, for example from a PC to the mobile Outlook app.Depends on context
clientAppUsed
All values- exchange activesyncExchange ActiveSyncActiveSync mail client.Depends on context
- imap4IMAP4Legacy IMAP with basic authentication. No MFA.Suspicious
- pop3POP3Legacy POP with basic authentication. No MFA.Suspicious
- authenticated smtpAuthenticated SMTPSMTP AUTH with basic authentication. No MFA.Suspicious
- smtpSMTPLegacy SMTP authentication.Suspicious
- other clientsOther clientsUnclassified legacy clients, often scripts.Suspicious
- exchange web servicesExchange Web ServicesEWS client.Depends on context
- mapi over httpMAPI over HTTPOutlook MAPI client.Depends on context
- outlook anywhere (rpc over http)Outlook AnywhereLegacy RPC over HTTP.Depends on context
- exchange online powershellExchange Online PowerShellRemote PowerShell to Exchange Online.Depends on context
incomingTokenType
All values- primaryrefreshtokenPrimary Refresh TokenA device-bound PRT was used for single sign-on.Depends on context
- refreshtokenRefresh tokenA refresh token was redeemed.Depends on context
- saml11SAML 1.1SAML 1.1 token from a federated identity provider.Depends on context
- saml20SAML 2.0SAML 2.0 token from a federated identity provider.Depends on context
- remotedesktoptokenRemote Desktop tokenToken from a Remote Desktop sign-in.Depends on context
appId
All values- 04b07795-8ddb-461a-bbee-02f9e1bf7b46Microsoft Azure CLIPublic client for the Azure command-line interface.Depends on context
- 1950a258-227b-4e31-a9cf-717495945fc2Microsoft Azure PowerShellPublic client for Azure PowerShell.Depends on context
- de8bc8b5-d9f9-48b1-a8ad-b748da725064Graph ExplorerMicrosoft Graph Explorer web tool.Depends on context
- c44b4083-3bb0-49c1-b47d-974e53cbdf3cAzure PortalAzure portal.Depends on context
- 00000002-0000-0000-c000-000000000000Azure AD Graph (resource)The legacy Azure AD Graph API. Still used by some offensive tooling.Depends on context
- 14d82eec-204b-4c2f-b7e8-296a70dab67eMicrosoft Graph Command Line ToolsPublic client used by the Microsoft Graph PowerShell SDK.Depends on context
- 29d9ed98-a469-4536-ade2-f981bc1d605eMicrosoft Authentication BrokerFirst-party broker client used for device registration and brokered sign-ins.Depends on context
- 1b730954-1685-4b74-9bfd-dac224a7b894Azure Active Directory PowerShellPublic client of the legacy AzureAD and MSOnline PowerShell modules.Depends on context
- 9ba1a5c7-f17a-4de9-a1f1-6178c8d51223Microsoft Intune Company PortalCompany Portal client used for device enrollment.Depends on context
- 797f4846-ba00-4fd7-ba43-dac1f8f63013Windows Azure Service Management APIResource ID for Azure Resource Manager (the Azure management plane).Depends on context
riskEventTypes_v2
All values- unfamiliarFeaturesUnfamiliar sign-in propertiesThe sign-in's properties (IP, ASN, location, device, browser) differ from the user's history.Suspicious
- anonymizedIPAddressAnonymous IP addressThe sign-in came from an anonymizing service such as Tor or an anonymous VPN.Suspicious
- unlikelyTravelAtypical travelTwo sign-ins from locations too far apart for the time between them.Suspicious
- maliciousIPAddressMalicious IP addressThe source IP is known for attacks or has a high failure rate.High signal
- leakedCredentialsLeaked credentialsThe user's valid credentials were found in a leak.High signal
- passwordSprayPassword sprayThe account was part of a password spray and the password worked.High signal
- investigationsThreatIntelligenceMicrosoft threat intelligenceActivity matches attack patterns known to Microsoft threat intelligence.High signal
- adminConfirmedUserCompromisedAdmin confirmed compromisedAn administrator marked the user as compromised.High signal
- anomalousTokenAnomalous tokenA token has unusual characteristics, such as an odd lifetime or a replay from an unfamiliar location.High signal
- tokenIssuerAnomalyToken issuer anomalyThe SAML token issuer may be compromised: the token's claims are unusual.High signal
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
- Was a user tricked into a device code sign-in?
- Was this session cookie stolen by an adversary-in-the-middle phishing kit?
- Was the user spammed with MFA prompts until they approved?
- Was this account taken over through the help desk?
- Is this a brute-force or password-spray attack, and did any attempt succeed?
- What did the attacker read, send and change in this mailbox?