Entra ID sign-in logs: what you get on each license
In a Microsoft 365 tenant, the most important authentication log is not on any server you run. It lives in Microsoft Entra ID, and how long it lives there depends on which license you pay for. Teams discover this during an incident: the suspicious sign-in was six weeks ago, and the portal only goes back seven days.
This article covers what Entra ID records about sign-ins, how long it keeps it on each license, and what it takes to keep more. Figures come from Microsoft’s documentation as of October 2026; licensing changes often, so every number links to its source.
Retention by license
From Microsoft Entra data retention:
| Report | Entra ID Free | Entra ID P1 | Entra ID P2 |
|---|---|---|---|
| Sign-in logs | 7 days | 30 days | 30 days |
| Audit logs | 7 days | 30 days | 30 days |
| Risky sign-ins | 7 days | 30 days | 90 days |
| Microsoft Graph activity logs | not available | only if sent to storage or analytics | only if sent to storage or analytics |
Two details from the same page matter in practice:
- Upgrading is not retroactive. Move from Free to P1 and you see at most the last seven days; anything older is gone unless you archived it.
- On Free, collection starts late. A Free tenant starts collecting when someone first opens Entra ID or calls the reporting APIs. Premium tenants collect from the moment the subscription starts.
Many organizations have P1 without knowing it: it is included in Microsoft 365 E3, E5 and Business Premium. Check before you buy anything.
Four kinds of sign-in
The portal shows them as tabs, and they behave very differently in volume and value:
| Log | What it records | Log Analytics table |
|---|---|---|
| Interactive user sign-ins | a person entering a password, approving MFA, using a passkey | SigninLogs |
| Non-interactive user sign-ins | a client using a token on the user’s behalf — Outlook refreshing, Teams reconnecting | AADNonInteractiveUserSignInLogs |
| Service principal sign-ins | applications authenticating as themselves with a secret or certificate | AADServicePrincipalSignInLogs |
| Managed identity sign-ins | Azure resources using managed identities | AADManagedIdentitySignInLogs |
Interactive sign-ins are where phishing, password spraying and MFA fatigue show up. Non-interactive sign-ins are usually the largest by far, and they are where a stolen session token gets used: an attacker replaying a token never signs in interactively. Service principal sign-ins are where a leaked application secret shows up. Collecting only the interactive log, because it is the cheapest, leaves exactly those two scenarios invisible.
The fields that carry the signal
Sign-in records are long. These are the fields worth parsing first:
ResultType—0is success; anything else is an error code. A few worth knowing:50126(invalid user name or password),50053(account locked, or sign-in blocked by smart lockout),50074and50076(strong authentication required — the password was right),53003(blocked by Conditional Access),500121(MFA failed or was denied).ConditionalAccessStatus—success,failureornotApplied.notAppliedon a sign-in you expected to be covered is a policy gap.AuthenticationRequirement— single-factor or multifactor. Successful single-factor sign-ins for accounts that should always use MFA are worth listing.ClientAppUsedandUserAgent— legacy protocols (IMAP, POP, SMTP AUTH, older Exchange clients) cannot do MFA. Any success there is a hole.IPAddress,LocationDetails,DeviceDetail— where and from what.DeviceDetailshows whether the device is joined or compliant, which says more than the country does.AppDisplayNameandResourceDisplayName— which application was signed in to, and which resource the token is for.RiskLevelDuringSignInandRiskState— Identity Protection’s verdict. Free and P1 tenants see a limited set; P2 gets the full detections and the 90-day retention above.
The pattern that matters most often: ResultType 50074 or 50076 means the attacker had the correct password and was stopped by MFA. That user needs a password reset today, even though nothing “succeeded”.
Keeping more than 30 days
You have three options, from cheapest to most capable:
- Export from the portal by hand. The sign-in log blade can download results as CSV or JSON. Fine for an investigation, useless as a process.
- Archive to a storage account. Diagnostic settings in Entra ID can send each log category to an Azure Storage account, with whatever retention you set. Cheap per GB and searchable only after you pull it back out, but it means the data exists when you need it.
- Send to Log Analytics / Microsoft Sentinel. Searchable with KQL, usable by detection rules, priced per GB ingested and retained. Microsoft’s Sentinel connector documentation states that a P1 or P2 license is required to ingest sign-in logs. Microsoft 365 E5 customers may get part of this volume covered by the Sentinel benefit for Microsoft 365; check the current terms.
A split that works for many teams: interactive and service principal sign-ins to the analytics workspace, where rules run on them; non-interactive sign-ins to cheaper storage, or to a lower-cost log tier where the workspace offers one, because they are needed for investigations more than for alerting. Choosing a SIEM by what you already run discusses the cost side of this decision.
Organizations with Purview Audit (Premium) through E5 licenses have another route: Microsoft notes that Purview can retain Entra audit logs beyond the default period. That covers audit logs, not the sign-in logs themselves.
What the logs will not tell you
- Token theft is subtle. A replayed token appears as a non-interactive sign-in from a new IP or device, with no password and no MFA prompt. Without the non-interactive log you will not see it at all.
- On-premises authentication is elsewhere. Users signing in to domain-joined machines with Kerberos and NTLM appear in your domain controllers’ logs, not here — see Kerberos in Windows logs.
- Federated sign-ins through AD FS or a third-party identity provider are partly recorded at the provider. Check where the password check actually happens.
- Location is approximate, and VPNs and mobile networks make it worse.
Testing
Sign in to a test account with a wrong password, then correctly with MFA, then from a device or location that one of your Conditional Access policies blocks. Within a few minutes the three attempts should appear in the interactive sign-in log with ResultType values 50126, 0 and 53003. If you export to Log Analytics, confirm the same three records arrive in SigninLogs and note how long they took.
Adapting this to your environment
ADAPTthe retention decision to your incident history: how long after the first malicious sign-in did you usually find out? Keep at least that, plus a margin.ADAPTthe categories you export: check that non-interactive and service principal sign-ins are included, not just the interactive tab.ADAPTyour MFA coverage review: list successful single-factor sign-ins and legacy-protocol sign-ins once a week until both lists are empty.
Questions and corrections: hello@entropywatch.dev.