Query Details
// GraphRunner Recon Detection & Response // https://www.linkedin.com/posts/activity-7186279751127334912-zjwN/ // We create a Sentinel NRT rule to detect the "Get-GraphTokens" and perform an automation rule of revoking the token. 🔥 SigninLogs | where AuthenticationProtocol == "deviceCode" | where ResourceDisplayName == "Microsoft Graph" | extend DeviceName = tostring(DeviceDetail.displayName) | extend TrustType = tostring(DeviceDetail.trustType) | where TrustType != "Hybrid Azure AD joined" and TrustType != "Azure AD joined"
This query is designed to detect suspicious sign-in activities related to Microsoft Graph using the "deviceCode" authentication protocol. Here's a simple summary:
SigninLogs).The purpose of this query is to identify potentially unauthorized or suspicious access to Microsoft Graph using device code authentication from devices that are not joined to Azure AD or Hybrid Azure AD.

Steven Lim
Released: August 5, 2024
Tables
Keywords
Operators