Sign-in Logs

Microsoft Entra ID: Integrations & Access Troubleshooting

Course 1 ยท Chapter 7 ยท Reading the Sign-in Logs

Every earlier chapter ended with "then check the logs". This chapter is that step. Entra records what it decided, and why, every time an application or user asks for a token. If you can find the right entry, the log usually names the cause directly, and that is far better evidence for a ticket (and for a client) than a guess. The skill is not reading every field. It is knowing which log, which filter, and which five or six fields to copy down.

Verified against current Microsoft pages, but portals change
The log names, filters and retention figures below come from Microsoft Learn pages dated 2025 to 2026. Retention and licensing are the figures most likely to change; check the retention page before you promise a client that "we can look back 90 days".

Four Logs, Not One

Entra keeps several activity logs. Choosing the right one is half the job. They are all under Entra ID > Monitoring & health in the admin center, and all entries are system generated and can't be changed or deleted.

LogIt answersFor your integration
Sign-in logsWho or what asked for a token, for which app and resource, and was it granted? Four types (next table)The main evidence for "can't sign in", expired secrets and blocks
Audit logsWhat was changed in the tenant, by whom, and when (users, groups, applications, consent)"Who rotated or removed the secret?" "When was consent revoked?"
Provisioning logsWhat the provisioning service did for each user or group sent to a non-Microsoft serviceSCIM problems (Chapter 2): create, update, delete, disable
Microsoft Graph activity logsThe Graph API requests an app madeRarely needed by support; they exist only if the client routes them to storage or analytics

The four kinds of sign-in

The sign-in logs page has four tabs, one per sign-in type. The most common mistake is looking at the first tab (interactive) and concluding "no failure was recorded".

TabMeaning (Microsoft)Look here when
Interactive user sign-insA user provides an authentication factor: a password, an MFA response, a biometric, a QR codeA person was at the screen: OIDC or SAML sign-in to your product (Chapter 3, steps 1 and 2)
Non-interactive user sign-insA client acts on a user's behalf with no factor required: using a refresh token to get an access token, redeeming an authorization code, background SSO. Entries are grouped, and the IP address of a confidential client's refresh shows the original token issuance, not the actual sourceStep 4 (code redemption) or silent refresh failed; "it signs in, then drops out an hour later"
Service principal sign-insNo user: the app presents its own credential (a secret or certificate), as in the OAuth client-credentials flow. Entries are grouped when the service principal, status, IP address and resource all matchBackground or API integrations; an expired secret or certificate on an app-only job (Chapter 4)
Managed identity sign-insAzure resources whose secrets Azure managesAlmost never, for a vendor integration
Where the failure lives, by Chapter 3's step
The browser redirect and user sign-in (steps 1 to 2) are recorded as interactive. Your server redeeming the code for tokens (step 4) is an app acting on behalf of a user, so look in non-interactive as well, and check service principal sign-ins when no user is involved at all. If nothing is where you expect, check all three before deciding the request never reached Entra.

Getting to the Logs

  1. Sign in to the Microsoft Entra admin center as at least a Reports Reader, which Microsoft names as the least privileged role for accessing the activity logs.
  2. Go to Entra ID > Monitoring & health > Sign-in logs (or Audit logs, or Provisioning logs).
  3. Better for one application: open Enterprise apps > <app> and use its own Sign-in logs, Audit logs and Provisioning logs pages. The filter is already set to that app.

Microsoft lists licensing for each log: audit and sign-in logs are available on the Free edition, while provisioning logs need Entra ID P1 or P2 (or the Suite). If a client's Provisioning logs page is missing, licensing is a likely reason. Also, any user can see their own recent sign-ins at mysignins.microsoft.com, which is a handy, permission-free way for an affected user to confirm a time and error without involving an administrator.

Retention: How Far Back Can You Look?

This matters more than anything else in the chapter, because "it started failing last Tuesday" is only useful if Tuesday's data still exists. From Microsoft's data-retention page:

ReportEntra ID FreeEntra ID P1Entra ID P2
Audit logs7 days30 days30 days
Sign-ins7 days30 days30 days
Risky sign-ins (security signal)7 days30 days90 days
Microsoft Graph activity logsNot availableNot retained unless integrated with storage or analytics tools
  • The retention page does not give a separate figure for provisioning logs in this table; confirm provisioning-log retention in the client's tenant before relying on it.
  • Changes aren't retroactive: when a tenant upgrades from Free to a premium edition, only data still within the 7-day free period is available. Expired data can't be recovered unless it was archived.
  • Longer retention comes from exporting: archive to an Azure storage account, send to a Log Analytics workspace (Azure Monitor), stream to an event hub or SIEM. Configuring that needs at least Security Administrator. Microsoft 365 E5 or similar licences can use Microsoft Purview Audit (Premium) for audit logs; the Microsoft 365 Unified Audit Log is a separate system.
The clock starts when the problem does
If a client first tells you about a failure on day 9 and they are on the Free edition, the first day of evidence is already gone. Ask for logs the same day, save what you see (screenshots, or the download button for JSON or CSV), and attach it to the ticket. Chapter 9 will make this a standing rule for the support team.

Finding the Entry

Filter the sign-in logs

Use Add filters. Microsoft's commonly used filters:

FilterUse it for
DateThe window around the failure. Remember that date and time in the log are shown in the time zone of the person using the admin center, not of the user who tried to sign in
ApplicationYour product's enterprise application name, or search by its Application ID. Names can be duplicated, so prefer the ID
StatusFailure to see failures only (also Success, Interrupted)
UserThe UPN of the affected person
Correlation IDAll the requests that are part of one sign-in attempt. Best for pinning one failure from a user's error message (Chapter 3)
Request IDOne sign-in request; Microsoft notes it corresponds to an issued token
ResourceThe service the sign-in was for (for example Microsoft Graph)
IP addressSource of the request: useful for location-based policies (Chapter 6)
Conditional AccessNot applied, Success or Failure
Client appBrowser, mobile and desktop, or legacy authentication clients

The best route: use the ID from the error

Chapter 3 told you to record the trace ID and correlation ID from the error. Now they pay off: paste the Correlation ID into the filter and you get exactly the attempt the user saw. Microsoft adds a caution: the correlation ID value is based on parameters passed by a client, so Entra can't guarantee its accuracy. If a correlation ID finds nothing, search by user, application and time instead.

Reading One Entry

Select a row to open the activity details. Microsoft frames every sign-in as who (the user), how (the client application) and what (the resource being accessed). Work through these tabs, and copy the fields in the table that follows.

TabWhat it showsUse it to
Basic infoThe bulk of the details: identifiers, status, the sign-in error code and failure reason, application, resource, client app, authentication requirementFind the error and its plain-English meaning
Location / Device infoIP address and approximate location; browser, operating system, and whether the device is compliant, managed or hybrid joinedSpot a location or device condition (note: IP-to-place mapping is best effort, and VPNs and mobile carriers distort it)
Authentication DetailsThe policies applied (such as Conditional Access or security defaults), the sequence of methods used, and whether each step succeededSee where MFA happened or failed
Conditional AccessEvery policy that could apply, with a result of Success, Failure, Not Applied or DisabledFind the exact blocking policy (Chapter 6)
Report-onlyWhat policies in report-only mode would have donePredict the effect of a policy someone is about to turn on

The fields to copy into the ticket

FieldWhy you want it
Date (with time zone)Lines up with the client's report and with audit-log changes
Status, Sign-in error code, Failure reasonMicrosoft: the failure reason describes the error, and the Additional Details often say how to fix it
Application and Application ID; Resource and Resource IDConfirms the right integration, and which API was called
User, User ID, User typeMember, guest or external (Chapter 6)
Authentication requirement; Client app; Client credential typeWhether MFA was required, whether the client was legacy, and which credential was presented
Correlation ID, Request IDMicrosoft's own guidance when unsure: gather both for further analysis or a support request
Home tenant and resource tenant; Cross-tenant access typeFor guest and multi-tenant cases (Chapters 2 and 6)
Conditional Access result and policy namesNames the blocking rule
Use the error lookup, not memory
Microsoft provides an error code lookup at login.microsoftonline.com/error (enter the number to get a description and remediation) and an authentication and authorization error-code reference. Search the number there rather than relying on a table in a course, including the one below.

The AADSTS Codes You Will Meet

Chapter 6 listed the consent, assignment and Conditional Access codes. These are the ones connected with credentials, tokens and the wrong tenant or application, in Microsoft's current wording (error name before the dash, shortened). Use them as a starting point, then confirm with the log's Failure reason.

CodeName and Microsoft's meaning (shortened)Points to
AADSTS7000222InvalidClientSecretExpiredKeysProvided: the provided client secret keys are expired; create new keys, or consider certificate credentialsExpired client secret (Chapters 4 and 8)
AADSTS7000215Invalid client secret is provided; "developer error", the app is signing in without the correct authentication parametersWrong or mistyped secret, or the secret ID used instead of its value (Chapter 4)
AADSTS7000218The request body must contain client_assertion or client_secretThe app sent no credential at all
AADSTS700027Client assertion failed signature validationWrong or mismatched certificate and key
AADSTS50012AuthenticationFailed: one of a list of reasons, including that the signing certificate isn't valid or its thumbprint isn't authorized, or the assertion has an invalid signatureCertificate credential problems (expired, wrong thumbprint)
AADSTS700030Invalid certificate: subject name in the certificate isn't authorizedCertificate subject mismatch
AADSTS700082ExpiredOrRevokedGrantInactiveToken: the refresh token expired due to inactivityA normal part of the token lifecycle (Chapter 4's refresh-token lifetimes)
AADSTS70008ExpiredOrRevokedGrant: the refresh token has expired due to inactivitySame family: ask the user to sign in again
AADSTS50173The provided grant has expired because it was revoked; a fresh token is needed (for example the user's password was changed or reset)Refresh-token revocation (Chapter 4)
AADSTS70043BadTokenDueToSignInFrequency: the refresh token expired or is invalid due to sign-in frequency checks by Conditional AccessA session-lifetime policy (Chapter 6)
AADSTS50011InvalidReplyTo: the reply address is missing, misconfigured, or doesn't match those configured for the appRedirect URI mismatch (Chapters 3 and 5)
AADSTS700016The application wasn't found in the directory or tenant (not installed, not consented, wrong identifier or tenant)Wrong client ID or tenant (Chapter 6)
AADSTS7000112UnauthorizedClientApplicationDisabled: the application is disabledChapter 5's "Enabled for users to sign in? = No"
AADSTS90002InvalidTenantName: the tenant name wasn't found; check the tenant IDWrong or mistyped tenant
What this table does not say: "which credential"
AADSTS7000222 tells you a secret has expired but not whether it is the one your system is using. A tenant often holds several secrets. Match the secret your system uses (Chapter 4's "two-sided" trap) against the dates in Certificates & secrets before you name the cause to the client.

Not every error number means the integration is broken

Microsoft lists some codes that appear in healthy tenants: 50058 (user authenticated but not yet signed in, which appears when a user didn't finish signing in, so the User field may even show a GUID); 90025 (an internal service hit its retry allowance, usually resolved automatically); 500121 (the user didn't complete the MFA prompt); 70046 (session expired or reauthentication check failed). A handful of these in a busy tenant are normal. The question to ask is whether the failures are constant and all users or sudden and specific.

The Audit Log: What Changed and Who Did It

Where the sign-in log says "what happened", the audit log answers "what was changed". It records changes to applications, groups, users and licences. You can filter by Service, Category, Activity, Status, Target (the object changed), Initiated by and a date range. Open an entry to see the Correlation ID, the actor, the target, and, where applicable, the old and new values of changed properties. Category ApplicationManagement is where integrations live. Activity names from Microsoft's current reference that matter here:

Activity nameWhat it can tell you
Update application โ€“ Certificates and secrets managementSomeone added, removed or changed a secret or certificate on the registration: a prime candidate for "who rotated it?"
Add service principal credentials / Remove service principal credentialsCredential changes on the enterprise application side
Create / Update / Delete CertificateSAML signing certificate changes (Chapter 4)
Update service principalChanges such as disabling sign-in ("Enabled for users to sign in?") or other properties
Add app role assignment to service principal / Remove app role assignment from service principalAssignment and application-permission changes (Chapter 6)
Consent to application / Add delegated permission grant / Remove delegated permission grant / Restore consentConsent granted, removed or restored (Chapter 6)
Add / Delete / Hard delete / Update application; Remove / Restore service principalThe object itself was added, changed, deleted or restored (Chapter 2's deletion caveats)
Add / Remove owner to application / service principalOwnership changes (Chapter 5)

The model is a timeline. Find the first failed sign-in in the sign-in log, then look at the audit log for the minutes, hours and days before it. A secret deleted at 17:02 and the first failure at 17:05 is a story. Cross-tenant access changes appear under the category CrossTenantAccessSettings (Chapter 6).

Whose audit log?
The audit log you can see is the client's tenant's. Changes made in your own tenant (arrangement A's app registration) appear only in your logs. Chapter 5's rule applies again: be sure which tenant you are in.

The Provisioning Log (SCIM)

For SCIM provisioning (Chapter 2), the sign-in log is the wrong place. The provisioning log (Entra ID > Monitoring & health > Provisioning logs, or the enterprise application's own Provisioning logs page) shows each identity processed: the Identity, the Action (Create, Update, Delete, Disable, StagedDelete, Other), the source and target systems, and a Status of Success, Failure, Skipped or Warning. Opening an entry gives four tabs:

  • Steps: the sequence for that object: import, match, scope check, evaluate, provision.
  • Troubleshooting & Recommendations: the error code and reason, often with guidance.
  • Modified Properties: old and new values.
  • Summary: an overview with identifiers for the object in both systems.

Extra filters worth knowing: Job ID, Cycle ID and Change ID; Microsoft says the cycle and change IDs can be shared with product support to find the exact event. A "Skipped" status has several causes (for example, an object out of scope) and isn't necessarily a failure.

Exporting Evidence for a Ticket

  1. Select the entry, copy the fields from the table above into the ticket (text, not just a screenshot, so it can be searched later).
  2. Download the filtered list from the log page as JSON or CSV, which Microsoft describes as the manual, cheapest option for a long-term backup.
  3. Screenshots must hide anything sensitive. The logs contain user names and IP addresses, so treat them as personal data and share only what the ticket needs.
  4. For repeatable or longer-term needs, the client's administrator can send logs to Log Analytics, a storage account or an event hub (diagnostic settings, which needs Security Administrator).
Empty results are not always "nothing happened"
Microsoft documents that queries can return no results, or HTTP 429 (Too Many Requests), because of throttling that depends on current system demand. Their workarounds: make the date range smaller and repeat, or stream logs to a Log Analytics workspace and query there. Before telling a client "there are no failures", try a narrower window and check the other sign-in tabs.

A Worked Reading

A fictional entry from a nightly sync job, copied the way you would copy it into a ticket:

== Sign-in logs > Service principal sign-ins == Date ................... 2026-10-02 02:00:04 (UTC+1) <-- note the time zone Status ................. Failure Application ............ Acme Reports Sync Application ID ......... 22222222-2222-2222-2222-222222222222 Resource ............... Microsoft Graph Sign-in error code ..... 7000222 Failure reason ......... Invalid client secret provided. The provided client secret keys are expired... Correlation ID ......... 33333333-3333-3333-3333-333333333333 Conditional Access ..... Not applied == Audit logs, filtered Target = Acme Reports Sync, 2026-09-25 to 2026-10-02 == 2026-09-30 17:02 Update application - Certificates and secrets management Success Initiated by: admin@fabrikam.example Target: Acme Reports Sync 2026-09-30 17:04 Update service principal Success

Reading it: who is the application itself (service principal); how is a client secret; what is Microsoft Graph. The error says the secret presented has expired, and the audit log shows credentials were changed two days earlier. That doesn't yet tell you whether the new secret was installed on your side; the evidence supports the Chapter 4 "two-sided" hypothesis, which Chapter 8 will test and fix.

What you can tell the client
"We've found the entry for last night's failed run in your Microsoft Entra sign-in log. It says the secret the application presented was expired. Your audit log also shows secrets for this application were changed on 30 September. So the likely situation is that a new secret was created but our system is still using the old one. We would like to confirm that by checking which secret is shown as current in your tenant, with your administrator watching. Nothing is wrong with your users' accounts." Quote the log's own words and times; it keeps the conversation factual.

Hands-On Exercises

All three use fictional organisations and values. Never put real secrets, tokens or tenant details into practice notes.

Exercise 1

For each situation, say which log and which sign-in tab (if relevant) you would open first, one filter you would apply, and one field you would copy: (a) a user says "sign-in to your product fails with an error page showing a correlation ID"; (b) your nightly import job, which uses a client secret and no user, stopped on Tuesday; (c) a client's users can sign in but are asked to sign in again every hour, via your server's refresh; (d) a client reports that their directory-to-product user sync created some users but not others; (e) the client's administrator asks "who changed the secret on your app, and when?"

๐Ÿ“„ View solution
Exercise 2

A Free-edition client tells you on 14 October that sign-ins failed "sometime in the first week of October, definitely before the 6th". Using the retention figures in this chapter, what is the earliest date you could still see in the sign-in and audit logs, what would change if they were on P1, and what would you ask them to do today? Then write the three-line instruction you would give so the next failure isn't lost.

๐Ÿ“„ View solution
Exercise 3

Interpret these fictional log extracts. For each, state the likely cause, the gate or chapter it belongs to, your confidence, and the one extra piece of evidence that would confirm it. Extract A: Service principal sign-in, Failure, error 7000215, Conditional Access Not applied. Extract B: Interactive sign-in, Failure, error 53003, Conditional Access tab: policy "Block outside UK" = Failure. Extract C: Non-interactive sign-in, Failure, error 700082, user last used the app 100 days ago. Extract D: Interactive sign-in, Failure, error 50011, redirect URI shown in the error ends without a trailing slash.

๐Ÿ“„ View solution

Chapter 7 Quick Reference

  • Logs live under Entra ID > Monitoring & health: Sign-in, Audit, Provisioning; Reports Reader is the least privileged role; provisioning logs need P1/P2
  • Four sign-in tabs: interactive, non-interactive, service principal, managed identity: check all three relevant ones before saying nothing was recorded
  • Retention: Free 7 days; P1 and P2 30 days for audit and sign-in logs (risky sign-ins 7/30/90); not retroactive; longer needs export (storage, Log Analytics, event hub)
  • Filter by Correlation ID (one sign-in attempt), Request ID, Application ID, User, Status = Failure, IP, Conditional Access
  • Date and time show in the viewer's time zone, not the user's
  • Copy: date and zone, status, error code, failure reason, app and resource IDs, user and type, authentication requirement, correlation and request IDs, Conditional Access result
  • Look up codes at login.microsoftonline.com/error: 7000222 expired secret; 7000215 invalid secret; 50012 / 700027 / 700030 certificate; 700082 / 70008 / 50173 refresh token; 50011 reply URL
  • Audit log: ApplicationManagement, "Update application โ€“ Certificates and secrets management", credentials, consent, role-assignment and service-principal activities
  • Timeline method: first failure in the sign-in log, then the audit log for the period before it
  • Provisioning log: Identity, Action, Status; tabs Steps, Troubleshooting & Recommendations, Modified Properties, Summary; cycle and change IDs for support
  • Empty or throttled (HTTP 429) results: shorten the date range or use Log Analytics
  • Treat log extracts as personal data; share only what the ticket needs