LoFP LoFP / custom device management agents, oem enrollment clients, linux intune enrollment, or updated microsoft clients that use new user-agent strings may match. add exclusions for known `azure.auditlogs.properties.useragent` values or enrollment programs after review.

Techniques

Sample rules

Entra ID Register Device with Unusual User Agent

Description

Detects successful, user-initiated Microsoft Entra ID audit events for Register device where additional details indicate an Azure AD join or Azure AD register and the recorded user agent is not one of the common native registration clients (Dsreg, DeviceRegistrationClient, or Dalvik-based Android enrollment). Legitimate Windows and standard mobile enrollment flows present predictable user-agent strings; unexpected clients such as axios, node, python-requests, or offensive tooling like GraphSpy and ROADtools may reflect scripted or adversary-driven device registration used to obtain a Primary Refresh Token for persistence or token abuse. Registrations performed by service principals or the Device Registration Service itself (for example Windows 365 Cloud PC pre-authorized joins) and Microsoft-owned EvoSTS authorization checks are excluded. Baseline approved provisioning tools and MDM integrations before tuning.

Detection logic

data_stream.dataset:"azure.auditlogs" and event.action:"Register device" and
event.outcome:(success or Success) and
azure.auditlogs.properties.initiated_by.user.id:* and
azure.auditlogs.properties.userAgent:(* and not (Dsreg* or DeviceRegistrationClient or Dalvik*)) and
azure.auditlogs.properties.additional_details.value:("Azure AD join" or "Azure AD register") and
not (azure.auditlogs.properties.userAgent:EvoSTS and source.as.number:8075)