Find other users with device-code sign-ins
Finding
The search identified device-code sign-ins across the scoped workforce accounts, including records without a usable session ID.
These sign-ins establish the users, applications, networks, and times to carry into the wider cloud-activity search.
View query
Q-01First searchFind other users with device-code sign-ins
What this checks
Find other workforce accounts that completed device-code sign-ins and preserve the application, network, and session context available for follow-up.
KQL
SigninLogs
| where TimeGenerated between (datetime(2026-08-19T09:00:00Z) .. datetime(2026-08-19T11:00:00Z))
| where AuthenticationProtocol == "device_code"
| where ResultType == 0
| where isempty(SessionId)
| project TimeGenerated, AccountObjectId, UserPrincipalName, ApplicationId, SourceIp, SessionIdSPL
| datamodel Authentication Authentication search
| search _time>=1787130000 _time<=1787137200 Authentication.authentication_method="device_code" Authentication.action="success"
| rename Authentication.* AS *
| where isnull(session_id) OR len(trim(session_id))=0
| table _time user user_id app src session_idWhat to look for
A review set of users, applications, source contexts, and sign-in times that can be compared with follow-on cloud activity.
Technical details
Tested signal
Successful device-code authentication with normalized account and application context but no usable cross-service session identifier.
Assumptions
- AuthenticationProtocol consistently identifies device-code sign-ins in the authored records.
- An empty SessionId represents unavailable correlation data rather than a parsing failure.
Data requirements and relevant fields
- authentication
Successful device-code sign-ins with account, application, source, result, time, and session context.
TimeGeneratedAccountObjectIdUserPrincipalNameApplicationIdAuthenticationProtocolSourceIpResultTypeSessionId
KQL schema
SigninLogs and its protocol, result, account, application, source, and session fields are illustrative mappings.
SPL schema
The epoch bounds preserve the authored UTC review window. Common authentication fields may use CIM aliases, but authentication_method, user_id, and session_id require validation against the selected source.
Limitations
- Missing SessionId prevents a strong event-level correlation.
- Successful device-code authentication may be legitimate and cannot establish user intent.
Both variants require source-specific device-code and session fields; CIM does not guarantee either field.