Query Details
# List all GraphAPI requests of a suspicious user
### Sentinel
```KQL
let SuspiciousUserId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx";
let SearchWindow = 48h; //Customizable h = hours, d = days
MicrosoftGraphActivityLogs
| where TimeGenerated > ago(SearchWindow)
| where UserId == SuspiciousUserId
| lookup kind=leftouter (IdentityInfo
| where TimeGenerated > ago(30d)
| summarize arg_max(TimeGenerated, *) by AccountObjectId
| project AccountObjectId, AccountDisplayName, AccountUPN)
on $left.UserId == $right.AccountObjectId
| project-reorder AccountDisplayName, AccountUPN, RequestMethod, RequestUri
```
This query lists all GraphAPI requests made by a suspicious user within the last 48 hours. It also includes information about the user's account such as display name and UPN.

Bert-Jan Pals
Released: April 21, 2024
Tables
Keywords
Operators