Read the sign-in logs: why can't someone sign in?

Azure Portal, Hands On10 minutesLook onlySteps checked 13 November 2026By Cloud Hands On

In this task you'll find out why someone couldn't sign in.

Every sign-in to your tenant is recorded in the sign-in logs: who, when, which app, from which IP address and location, which device, whether MFA was used, and whether it worked. When it fails, there's an error code and a reason.

On Entra ID Free you can see 7 days of sign-ins; P1 and P2 keep 30 days. To keep them longer, send them to a Log Analytics workspace with a diagnostic setting.

Example. A SS Kaiser store manager rings to say they can't get into Outlook. The service desk filters the sign-in logs for their name, sees error 50126 (wrong user name or password) five times in ten minutes, and resets the password instead of guessing.

Before you start

You need: Reports Reader, Security Reader or Global Reader. Time: 10 minutes.

Where to look

  1. Home
  2. Microsoft Entra ID
  3. Monitoring
  4. Sign-in logs

Steps

  1. Open Microsoft Entra ID, expand Monitoring and select Sign-in logs. The page opens as Sign-in events.A banner may offer a newer preview view with more filters. Either view works.
  2. Leave the User sign-ins (interactive) tab selected. Date starts on Last 24 hours; change it if the problem was earlier.
  3. Select Add filters, choose User, and type the person's name.Add Status = Failure to see only the problems.
  4. Select a failed sign-in. The Basic info tab shows the Sign-in error code and Failure reason, plus a Correlation ID and a link to the Sign-in Diagnostic under Troubleshoot Event.
  5. Read the other tabs: Location (IP address and city), Device info, Authentication Details (which MFA method was asked for) and Conditional Access (which policies applied).
  6. Common codes: 50126 wrong user name or password, 50053 account locked, 50057 account disabled, 50076 MFA needed, 53003 blocked by Conditional Access.

Commands

# Last 10 failed sign-ins (Microsoft Graph, needs AuditLog.Read.All)
az rest --method get --url "https://graph.microsoft.com/v1.0/auditLogs/signIns?\$filter=status/errorCode ne 0&\$top=10" \
  --query "value[].{when:createdDateTime, who:userPrincipalName, app:appDisplayName, code:status.errorCode}" --output table

Watch out for

Cost
Free to read. Keeping logs longer in Log Analytics costs a little per GB.
Security
Many failures from unusual countries, followed by a success, can mean a password-guessing attack (desk lab D5). Report it rather than just resetting the password.
Common mistakes
Looking only at interactive sign-ins. Background app sign-ins are on the User sign-ins (non-interactive) tab.

Clean up

Nothing to clean up. This task only reads.

Words to know

Interactive sign-in
One where the person typed something or approved a prompt.
Non-interactive sign-in
An app renewing its token in the background on someone's behalf.
Correlation ID
The ID to quote to Microsoft support for one sign-in.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going