How the attack works
Microsoft Entra ID knows a device as registered, joined or hybrid joined. A registered or joined device receives a Primary Refresh Token (PRT) for its user. Microsoft describes the PRT as a primary authentication artifact that in some cases also counts as a multifactor authentication artifact. It is valid for 90 days, it is renewed for as long as the device is used, and Conditional Access is not evaluated when it is renewed. Unless the device settings restrict it, users register and join devices themselves, by default up to 50 each.
An attacker who has a user's password, or a token obtained through phishing, registers or joins a device of their own in the user's name. From then on the attacker works from a device the tenant knows and does not have to phish the user again. Microsoft names this in its guidance for devices: attackers may try to register their own devices. Hybrid join is started and controlled by administrators, which leaves fewer ways to abuse it.
Two logs record the registration. The sign-in log holds the sign-in to the resource Device Registration Service that comes with it, including whether MFA was required. The audit log holds the new device, and Add registered owner to device names the user who registered or joined it. In a tenant with many enrollments neither event is suspicious on its own. The first rule on this page is therefore narrowed to registrations that needed only one factor, and the second is a building block to scope and correlate. A third rule reads Set device registration policies, the activity Microsoft lists for changes to the device settings that decide who may register or join devices and whether MFA is required for it.
What an attacker needs
- The password of a user, or a token for the user that is accepted by the Device Registration Service.
- Device settings that let the user register or join devices, and no requirement for MFA at that step that the attacker cannot meet.
- A device quota that is not used up. The default is 50 devices per user.
Impact
A device in the user's name that holds a Primary Refresh Token. The attacker keeps access to the user's applications without signing in again, can satisfy policies that ask for a registered device, and stays until the device object is disabled or deleted. A reset of the user's password alone does not remove the device.
Detection rules
Device Registration Policies of the Tenant Changed
Detects the audit activity "Set device registration policies", which Microsoft's audit activity reference lists for the Device Registration Service in the category Policy. The device settings of a tenant decide who may join or register devices, whether multifactor authentication is required to do so and how many devices one user may have. Loosening them lets a stolen password register a device, and the device then receives a Primary Refresh Token. Microsoft's security operations guide for devices names this activity for changes to the device registration MFA toggle. In the same row it says that there isn't an audit log entry for the toggle being set to off and tells the reader to schedule periodic checks. The rule therefore reports the activity when it is written, and a silent rule does not prove that the settings are unchanged. It matches on the activity name only, because Microsoft does not document the fields of the record, and is rated low. Compare the device settings in the admin center with your baseline when it fires.
title: Device Registration Policies of the Tenant Changed
id: 767ab59d-b469-4588-a7af-9807b8c69785
status: experimental
description: >-
Detects the audit activity "Set device registration policies", which
Microsoft's audit activity reference lists for the Device Registration
Service in the category Policy. The device settings of a tenant decide who
may join or register devices, whether multifactor authentication is
required to do so and how many devices one user may have. Loosening them
lets a stolen password register a device, and the device then receives a
Primary Refresh Token. Microsoft's security operations guide for devices
names this activity for changes to the device registration MFA toggle. In
the same row it says that there isn't an audit log entry for the toggle
being set to off and tells the reader to schedule periodic checks. The rule
therefore reports the activity when it is written, and a silent rule does
not prove that the settings are unchanged. It matches on the activity name
only, because Microsoft does not document the fields of the record, and is
rated low. Compare the device settings in the admin center with your
baseline when it fires.
references:
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-devices
- https://learn.microsoft.com/en-us/entra/identity/devices/manage-device-identities
- https://attack.mitre.org/techniques/T1098/005/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.005
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName: Set device registration policies
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- Planned changes to the device settings, for example when a device rollout starts, when the limit of devices per user is raised or when the MFA requirement is moved to a Conditional Access policy. Microsoft tells administrators to set the toggle to No in that last case. Match the event to a change record.
level: low
False positives
- Planned changes to the device settings, for example when a device rollout starts, when the limit of devices per user is raised or when the MFA requirement is moved to a Conditional Access policy. Microsoft tells administrators to set the toggle to No in that last case. Match the event to a change record.
Device Registered or Joined Without MFA
Detects a successful sign-in to the resource Device Registration Service whose authentication requirement was a single factor. Microsoft recommends requiring MFA to register or join devices and alerting on any device that is registered or joined without it, because the device receives a Primary Refresh Token. Microsoft's own sample also asks for a Conditional Access status of success. This rule leaves that out so that tenants without a policy for device registration are covered too. The authentication requirement does not count an MFA claim the user already held, so read the authentication details before concluding that no second factor was used.
title: Device Registered or Joined Without MFA
id: 6de6d0a4-a7a5-437a-8710-6d91fb033e93
status: experimental
description: >-
Detects a successful sign-in to the resource Device Registration Service
whose authentication requirement was a single factor. Microsoft recommends
requiring MFA to register or join devices and alerting on any device that is
registered or joined without it, because the device receives a Primary
Refresh Token. Microsoft's own sample also asks for a Conditional Access
status of success. This rule leaves that out so that tenants without a
policy for device registration are covered too. The authentication
requirement does not count an MFA claim the user already held, so read the
authentication details before concluding that no second factor was used.
references:
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-devices
- https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-all-users-device-registration
- https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-reporting
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/signinlogs
- https://attack.mitre.org/techniques/T1098/005/
author: Forestall
date: 2026-11-16
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.005
logsource:
product: azure
service: signinlogs
detection:
selection:
ResourceDisplayName: Device Registration Service
AuthenticationRequirement: singleFactorAuthentication
ResultType: '0' # string column: "0" is success
condition: selection
falsepositives:
- Every enrollment in a tenant that does not require MFA to register or join devices. Expect one event per enrolled device there, and treat the volume as a reason to add the requirement.
- Enrollment paths to which the MFA requirement of the device settings does not apply, such as Windows Autopilot self-deploying mode and Microsoft Entra joined virtual machines in Azure. Exclude the documented enrollment accounts by UserPrincipalName.
- Users who already held an MFA claim from an earlier sign-in. The authentication requirement does not show it, the authentication details do.
level: medium
False positives
- Every enrollment in a tenant that does not require MFA to register or join devices. Expect one event per enrolled device there, and treat the volume as a reason to add the requirement.
- Enrollment paths to which the MFA requirement of the device settings does not apply, such as Windows Autopilot self-deploying mode and Microsoft Entra joined virtual machines in Azure. Exclude the documented enrollment accounts by UserPrincipalName.
- Users who already held an MFA claim from an earlier sign-in. The authentication requirement does not show it, the authentication details do.
User Became the Registered Owner of a Device
Detects the audit activity "Add registered owner to device" of the Core Directory service. Microsoft defines the registered owner as the user who cloud joined the device or registered a personal device, and sets it at the time of registration, so the event ties a new device to a user account. It is written for every device a person registers or joins, which makes this rule a building block and not an alert. Scope it to accounts that should not enroll devices, or correlate it with a risky sign-in, a device code sign-in or a new authentication method for the same user.
title: User Became the Registered Owner of a Device
id: 270252b2-0aa5-41bd-9d1c-0bcaa0be8922
status: experimental
description: >-
Detects the audit activity "Add registered owner to device" of the Core
Directory service. Microsoft defines the registered owner as the user who
cloud joined the device or registered a personal device, and sets it at the
time of registration, so the event ties a new device to a user account. It
is written for every device a person registers or joins, which makes this
rule a building block and not an alert. Scope it to accounts that should
not enroll devices, or correlate it with a risky sign-in, a device code
sign-in or a new authentication method for the same user.
references:
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://learn.microsoft.com/en-us/graph/api/device-list-registeredowners
- https://learn.microsoft.com/en-us/entra/architecture/security-operations-devices
- https://attack.mitre.org/techniques/T1098/005/
author: Forestall
date: 2026-11-16
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.005
logsource:
product: azure
service: auditlogs
detection:
selection:
OperationName: Add registered owner to device
filter_failed:
Result: failure
condition: selection and not filter_failed
falsepositives:
- Normal enrollment. New hires, replaced laptops and phones, and personal devices registered for work all produce this event, so a large tenant sees it many times a day.
- Enrollment accounts used by IT to prepare devices in bulk. Exclude them once they are documented.
level: low
False positives
- Normal enrollment. New hires, replaced laptops and phones, and personal devices registered for work all produce this event, so a large tenant sees it many times a day.
- Enrollment accounts used by IT to prepare devices in bulk. Exclude them once they are documented.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Device registered shortly after a risky sign-in or from an address new for the user
An attacker who obtained a password or token registers a device to keep access, from their own network and soon after the first sign-in. A registration right after a risk detection, or from an address the user has never used, is the strongest signal. Joining the sign-in to the Device Registration Service with the user's risk detections and address history turns that into a detection.
- Sign-in log: a successful sign-in (
ResultType0) toResourceDisplayNameDevice Registration Service. TakeUserPrincipalName,IPAddressand the time. - Risk detections of the same user in the 24 hours before (
AADUserRiskEventsin Microsoft Sentinel), and theIPAddressvalues of the user's sign-ins in the previous 30 days. - Keep registrations that follow a risk detection, or whose
IPAddressthe user has not used in the 30 days and that lies outside your known egress ranges. - Audit log:
Add registered owner to devicefor the user in the same window names the device to disable.
EventsAdd registered owner to device
LimitsNew hires and users who replace a phone register from home networks the tenant has not seen, so a new address alone is weak and a risk detection before it is stronger. Risk detections need Microsoft Entra ID P2. The 24 hours and 30 days are starting points.
Triage
- Identify the user and the device. Read the operating system, the join type and the device name, and compare them with the hardware your organization hands out.
- Ask the user whether they enrolled a device at that time. A registration right after a risky or unfamiliar sign-in is the strongest signal.
- Compare the IP address and location of the sign-in to the Device Registration Service with the user's sign-in history.
- Check what the account did before the registration, such as a device code sign-in, a new authentication method or a password reset.
- List the devices of the user. Several new devices in a short time, or a device that never reports to device management, point away from a normal enrollment.
Response
Once the attack is confirmed:
- Disable the device object first, which invalidates the Primary Refresh Token issued to it, and delete it once the investigation no longer needs it.
- Revoke the sessions of the user and reset the password. Remove authentication methods that were registered from the rogue device or after the first suspicious sign-in.
- Review what the account did from the device, using the device ID in the sign-in log, and treat the data it reached as exposed.
- Go through the other devices of the user, and look for further devices registered from the same IP address under other accounts.
- Close the gap that allowed the registration, usually a missing MFA requirement for registering or joining devices.
Mitigation
- Require MFA to register or join devices, with the Conditional Access user action "Register or join devices" or with the device setting of the same name. Microsoft documents that the two must not be combined.
- Limit who may join devices in the device settings, and lower the maximum number of devices per user from the default of 50 to what people need.
- Require a compliant device, not only a registered one, in the Conditional Access policies that protect sensitive applications. Registration alone does not make a device compliant.
- Remove stale devices regularly, so that a new device on an account stands out.
- With Microsoft Entra ID P2, use a user risk policy with the Require risk remediation control. For a user flagged as having a device added by an attacker, ID Protection then disables the device object.
Frequently asked questions
Does resetting the user's password remove the attacker's device?
No. The device object stays in the directory until someone disables or deletes it. Microsoft documents that a Primary Refresh Token is invalidated when its device is deleted or disabled, and that a password change invalidates a token that was obtained with the password. Disable the device as well as resetting the password and revoking the sessions.
How noisy are these rules in a large tenant?
The rule on the registered owner fires once for every device a person registers or joins, so in a large tenant that is every enrollment of every working day. Use it as a building block. The sign-in rule fires only when the sign-in to the Device Registration Service needed a single factor. Where MFA is required for registration it should be nearly silent, and where it is not required it also fires for every enrollment.
Why does the sign-in rule not use the Conditional Access status?
Microsoft's sample query for registrations without MFA keeps only sign-ins where Conditional Access succeeded. A tenant without any policy for device registration records the status as not applied and would be missed, and that tenant is the most exposed. The rule therefore asks only for a successful sign-in to the Device Registration Service with a single-factor requirement.
Do the rules see hybrid joined devices?
Not as an attack path. Microsoft defines the registered owner as the user who cloud joined a device or registered a personal device, so the rule on the registered owner follows those two cases. Hybrid join is started and controlled by administrators, and the MFA requirement for registration does not apply to it.
References
- MITRE ATT&CK T1098.005: Device Registration
- Microsoft Entra security operations for devices (device registrations and joins outside policy)
- Microsoft Entra audit log activities (Core Directory and Device Registration Service)
- Understanding Primary Refresh Token (lifetime, renewal and invalidation)
- Manage device identities using the Microsoft Entra admin center (device settings and audit logs)
- Require multifactor authentication for device registration
- List registeredOwners (definition of the registered owner of a device)
- Risk-based access policies (attacker-added device)
- SigninLogs table reference (SessionId, OriginalTransferMethod, AutonomousSystemNumber, TokenIssuerName, AuthenticationProcessingDetails)
- AADUserRiskEvents table reference