Query Details
id: c8d4e6f7-a2b3-5c9d-0e1f-2a3b4c5d6e7f
name: Non-Interactive Sign-In from Threat Intelligence IP
version: 1.0.0
kind: Scheduled
description: |
Detects non-interactive (silent) Azure AD sign-ins originating from IP addresses
present in the ThreatIntelIndicators table (unified TI - replaces deprecated
ThreatIntelligenceIndicator). Silent sign-ins from known-malicious IPs indicate
that an attacker has an active refresh token and is using it from
attacker-controlled infrastructure.
MITRE ATT&CK: T1528 (Steal Application Access Token), T1078 (Valid Accounts)
severity: High
requiredDataConnectors:
- connectorId: AzureActiveDirectory
dataTypes:
- AADNonInteractiveUserSignInLogs
- connectorId: ThreatIntelligence
dataTypes:
- ThreatIntelIndicators
queryFrequency: 15m
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- CredentialAccess
- CommandAndControl
- InitialAccess
relevantTechniques:
- T1528
- T1078
- T1539
query: |
let MaliciousIPs =
ThreatIntelIndicators
| where TimeGenerated > ago(30d)
| where IsActive == true
| where isempty(ValidUntil) or ValidUntil > now()
| where Pattern has "ipv4-addr:value"
| extend NetworkIP = extract(@"ipv4-addr:value = '([^']+)'", 1, Pattern)
| where isnotempty(NetworkIP)
| summarize ThreatTags = make_set(Tags) by NetworkIP;
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(1h)
| where ResultType == 0
| join kind=inner MaliciousIPs on $left.IPAddress == $right.NetworkIP
| project
TimeGenerated,
UserPrincipalName,
AppDisplayName,
IPAddress,
Location,
ThreatTags,
ConditionalAccessStatus,
AuthenticationRequirement,
CorrelationId,
UniqueTokenIdentifier
| order by TimeGenerated desc
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: UserPrincipalName
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPAddress
customDetails:
ThreatTags: ThreatTags
AppDisplayName: AppDisplayName
alertDetailsOverride:
alertDisplayNameFormat: "TI Match - Non-Interactive Sign-In from Malicious IP for {{UserPrincipalName}}"
alertDescriptionFormat: "User {{UserPrincipalName}} performed a silent token refresh from IP {{IPAddress}} which is flagged in Threat Intelligence as: {{ThreatTags}}."
incidentConfiguration:
createIncident: true
groupingConfiguration:
enabled: true
reopenClosedIncident: false
lookbackDuration: PT5H
matchingMethod: AnyAlert
groupByEntities:
- Account
- IP
groupByAlertDetails: []
groupByCustomDetails: []
This query is designed to detect non-interactive (silent) sign-ins to Azure Active Directory (Azure AD) that originate from IP addresses flagged as malicious in a threat intelligence database. Here's a simple breakdown of what the query does:
Purpose: It identifies silent sign-ins from IPs known to be malicious, suggesting that an attacker might be using a stolen refresh token from their own infrastructure.
Data Sources:
Detection Logic:
Alerting:
Severity and Tactics:
Incident Management:
In summary, this query helps security teams quickly identify and respond to potential unauthorized access attempts from known malicious IPs, enhancing the organization's security posture against credential theft and misuse.

David Alonso
Released: May 29, 2026
Tables
Keywords
Operators