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.
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.
| Log | It answers | For your integration |
|---|---|---|
| Sign-in logs | Who 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 logs | What was changed in the tenant, by whom, and when (users, groups, applications, consent) | "Who rotated or removed the secret?" "When was consent revoked?" |
| Provisioning logs | What the provisioning service did for each user or group sent to a non-Microsoft service | SCIM problems (Chapter 2): create, update, delete, disable |
| Microsoft Graph activity logs | The Graph API requests an app made | Rarely 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".
| Tab | Meaning (Microsoft) | Look here when |
|---|---|---|
| Interactive user sign-ins | A user provides an authentication factor: a password, an MFA response, a biometric, a QR code | A person was at the screen: OIDC or SAML sign-in to your product (Chapter 3, steps 1 and 2) |
| Non-interactive user sign-ins | A 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 source | Step 4 (code redemption) or silent refresh failed; "it signs in, then drops out an hour later" |
| Service principal sign-ins | No 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 match | Background or API integrations; an expired secret or certificate on an app-only job (Chapter 4) |
| Managed identity sign-ins | Azure resources whose secrets Azure manages | Almost never, for a vendor integration |
Getting to the Logs
- 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.
- Go to Entra ID > Monitoring & health > Sign-in logs (or Audit logs, or Provisioning logs).
- 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:
| Report | Entra ID Free | Entra ID P1 | Entra ID P2 |
|---|---|---|---|
| Audit logs | 7 days | 30 days | 30 days |
| Sign-ins | 7 days | 30 days | 30 days |
| Risky sign-ins (security signal) | 7 days | 30 days | 90 days |
| Microsoft Graph activity logs | Not available | Not 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.
Finding the Entry
Filter the sign-in logs
Use Add filters. Microsoft's commonly used filters:
| Filter | Use it for |
|---|---|
| Date | The 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 |
| Application | Your product's enterprise application name, or search by its Application ID. Names can be duplicated, so prefer the ID |
| Status | Failure to see failures only (also Success, Interrupted) |
| User | The UPN of the affected person |
| Correlation ID | All the requests that are part of one sign-in attempt. Best for pinning one failure from a user's error message (Chapter 3) |
| Request ID | One sign-in request; Microsoft notes it corresponds to an issued token |
| Resource | The service the sign-in was for (for example Microsoft Graph) |
| IP address | Source of the request: useful for location-based policies (Chapter 6) |
| Conditional Access | Not applied, Success or Failure |
| Client app | Browser, 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.
| Tab | What it shows | Use it to |
|---|---|---|
| Basic info | The bulk of the details: identifiers, status, the sign-in error code and failure reason, application, resource, client app, authentication requirement | Find the error and its plain-English meaning |
| Location / Device info | IP address and approximate location; browser, operating system, and whether the device is compliant, managed or hybrid joined | Spot a location or device condition (note: IP-to-place mapping is best effort, and VPNs and mobile carriers distort it) |
| Authentication Details | The policies applied (such as Conditional Access or security defaults), the sequence of methods used, and whether each step succeeded | See where MFA happened or failed |
| Conditional Access | Every policy that could apply, with a result of Success, Failure, Not Applied or Disabled | Find the exact blocking policy (Chapter 6) |
| Report-only | What policies in report-only mode would have done | Predict the effect of a policy someone is about to turn on |
The fields to copy into the ticket
| Field | Why 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 reason | Microsoft: the failure reason describes the error, and the Additional Details often say how to fix it |
| Application and Application ID; Resource and Resource ID | Confirms the right integration, and which API was called |
| User, User ID, User type | Member, guest or external (Chapter 6) |
| Authentication requirement; Client app; Client credential type | Whether MFA was required, whether the client was legacy, and which credential was presented |
| Correlation ID, Request ID | Microsoft's own guidance when unsure: gather both for further analysis or a support request |
| Home tenant and resource tenant; Cross-tenant access type | For guest and multi-tenant cases (Chapters 2 and 6) |
| Conditional Access result and policy names | Names the blocking rule |
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.
| Code | Name and Microsoft's meaning (shortened) | Points to |
|---|---|---|
| AADSTS7000222 | InvalidClientSecretExpiredKeysProvided: the provided client secret keys are expired; create new keys, or consider certificate credentials | Expired client secret (Chapters 4 and 8) |
| AADSTS7000215 | Invalid client secret is provided; "developer error", the app is signing in without the correct authentication parameters | Wrong or mistyped secret, or the secret ID used instead of its value (Chapter 4) |
| AADSTS7000218 | The request body must contain client_assertion or client_secret | The app sent no credential at all |
| AADSTS700027 | Client assertion failed signature validation | Wrong or mismatched certificate and key |
| AADSTS50012 | AuthenticationFailed: 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 signature | Certificate credential problems (expired, wrong thumbprint) |
| AADSTS700030 | Invalid certificate: subject name in the certificate isn't authorized | Certificate subject mismatch |
| AADSTS700082 | ExpiredOrRevokedGrantInactiveToken: the refresh token expired due to inactivity | A normal part of the token lifecycle (Chapter 4's refresh-token lifetimes) |
| AADSTS70008 | ExpiredOrRevokedGrant: the refresh token has expired due to inactivity | Same family: ask the user to sign in again |
| AADSTS50173 | The 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) |
| AADSTS70043 | BadTokenDueToSignInFrequency: the refresh token expired or is invalid due to sign-in frequency checks by Conditional Access | A session-lifetime policy (Chapter 6) |
| AADSTS50011 | InvalidReplyTo: the reply address is missing, misconfigured, or doesn't match those configured for the app | Redirect URI mismatch (Chapters 3 and 5) |
| AADSTS700016 | The application wasn't found in the directory or tenant (not installed, not consented, wrong identifier or tenant) | Wrong client ID or tenant (Chapter 6) |
| AADSTS7000112 | UnauthorizedClientApplicationDisabled: the application is disabled | Chapter 5's "Enabled for users to sign in? = No" |
| AADSTS90002 | InvalidTenantName: the tenant name wasn't found; check the tenant ID | Wrong or mistyped tenant |
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 name | What it can tell you |
|---|---|
| Update application โ Certificates and secrets management | Someone 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 credentials | Credential changes on the enterprise application side |
| Create / Update / Delete Certificate | SAML signing certificate changes (Chapter 4) |
| Update service principal | Changes 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 principal | Assignment and application-permission changes (Chapter 6) |
| Consent to application / Add delegated permission grant / Remove delegated permission grant / Restore consent | Consent granted, removed or restored (Chapter 6) |
| Add / Delete / Hard delete / Update application; Remove / Restore service principal | The object itself was added, changed, deleted or restored (Chapter 2's deletion caveats) |
| Add / Remove owner to application / service principal | Ownership 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).
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
- Select the entry, copy the fields from the table above into the ticket (text, not just a screenshot, so it can be searched later).
- 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.
- 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.
- 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).
A Worked Reading
A fictional entry from a nightly sync job, copied the way you would copy it into a ticket:
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.
Hands-On Exercises
All three use fictional organisations and values. Never put real secrets, tokens or tenant details into practice notes.
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 solutionA 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 solutionInterpret 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 solutionChapter 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