Jul 24 2023 07:37 PM
How we can create KQL query to trigger an alert when the existing user (helpdesk guy) signs in to a new windows device for the very first time using azure active directory. Example: Helpdesk logins to freshly purchased system for setup. Need to get an alert for that when the helpdesk guy logins to a fresh system for the very first time.
Azure AD Signin logs have User principal and Device Name however cant seem to figure out how to identify the first ever login?
Any thoughts how we can achieve this?
Thanks
Jul 25 2023 04:47 AM
I would recommend using IntuneAudit for this, but for SigninLogs you could start with something like this, although I would not recommend it, I have just looked into this and the DeviceDetail data is very weak:
let seenDvc = SigninLogs
| where TimeGenerated >ago(lookback)
| extend deviceName = tostring(DeviceDetail.displayName)
| summarize min(TimeGenerated) by UserPrincipalName, deviceName
| project UserPrincipalName, deviceName, firstSeen=min_TimeGenerated;
Let me know how you get on.
Jul 25 2023 08:00 AM