← Sentinel query library

Identity · Microsoft Sentinel

Inventory sign-ins from legacy client categories

Review sign-in outcomes for legacy client-app labels before changing authentication policy, including failures and unknown outcomes.

Before you run

Data & scope

Required tables
SigninLogs
Time window
7 days
  • Microsoft Entra ID connector with SigninLogs and seven days of retained data.
  • Microsoft Entra ID P1 or P2 for ingestion and access to query SigninLogs; inspect noninteractive logs separately.

Documentation review by Codex (AI). No live-tenant execution or detection-performance claim. Validate schema, data coverage and expected results in your workspace.

Kusto Query Language
Download .kql
// Hunting starter. Documentation checked 2026-11-13; not tenant-tested.
SigninLogs
| where TimeGenerated >= ago(7d) and TimeGenerated <= now()
| where ClientAppUsed in~ ("Exchange ActiveSync", "Other clients",
    "IMAP4", "POP3", "SMTP", "Authenticated SMTP", "MAPI", "Exchange Web Services")
| extend Outcome = case(ResultType == "0", "Success",
    isnotempty(ResultType), "Non-success code", "Unknown")
| summarize SignInRows = count(), FirstSeen = min(TimeGenerated),
    LastSeen = max(TimeGenerated), SourceIPs = make_set(IPAddress, 10),
    ResultCodes = make_set(ResultType, 10)
    by AADTenantId, UserId, UserPrincipalName, AppId, AppDisplayName, ClientAppUsed, Outcome
| order by Outcome asc, SignInRows desc
| take 200

Read-only query. Run in your own authorized workspace after checking prerequisites.

This inventory helps find authentication dependencies that need investigation before a legacy-client policy change. It groups selected client-app labels by user, application and result over seven days. Use it to identify owners and test a migration plan, including administrative and service workflows that support AI workloads.

Interpret client labels carefully

The selected values are a reviewable list of client categories and protocol labels, not a complete protocol detector. Microsoft recommends checking the client-app classification in sign-in logs when preparing a legacy-authentication block. Confirm the exact values present in your tenant before narrowing the query or treating the list as exhaustive.

The query keeps successful, non-success and missing result codes separate. A nonzero code is not automatically a password error, and an unsuccessful row does not prove a policy caused the interruption. Investigate the original error and Conditional Access details. A protocol name alone also does not establish every authentication mechanism used by that application; confirm the actual flow and service configuration.

Build a dependency decision

For each successful group, resolve the account and application owner. Record the business process, its expected schedule, the client configuration and the proposed supported replacement. Distinguish an interactive employee dependency from an unattended process misusing a user account. Avoid collecting passwords or tokens in migration notes.

A seven-day window can miss month-end jobs or infrequent emergency procedures. Review the known service inventory and use a longer retained window when justified. Failed rows can reveal abandoned clients, stale mobile settings and retry loops; investigate those separately from working dependencies. Approved exceptions should be narrow, owned and time-limited.

Test the interpretation

Use known client activity to check whether the expected label appears. Validate successful, blocked and unknown-result samples against the original sign-in activity details. Review the separate noninteractive sign-in table because this query only reads SigninLogs; it does not promise coverage of every delegated token refresh.

The counts are ingested records, and IP lists are bounded samples rather than an exhaustive network history. The result cap shows only 200 groups. This read-only inventory was checked against documentation and has not been executed in a tenant. Empty output requires confirming collection, retention and the observed category vocabulary before concluding that no legacy dependency remains.

Verify the source

Microsoft references

  1. Microsoft Learn — SigninLogs table schema ↗
  2. Microsoft Learn — Block legacy authentication ↗
  3. Microsoft Learn — Sign-in activity details ↗
Before turning a hunt into an alert

Measure normal activity, validate known test cases, account for ingestion delays, choose a threshold and entity mapping, and assign an owner. Results require investigation.

Follow the detection learning path →