sodcalculator

10 Tech How-To

Fix Duplicate Device Entries in Microsoft Entra ID Hybrid Join

Guide 10-55105 · Updated · Step by step

Duplicate device entries in Microsoft Entra ID (formerly Azure AD) for hybrid-joined devices can cause authentication issues, compliance reporting errors, and confusion when managing devices. This guide walks you through identifying and removing duplicate entries, then preventing them from reappearing. You’ll need administrative access to Entra ID and, in most cases, local admin rights on the affected device.

What You’ll Need

  • Global Administrator or Intune Administrator role in Microsoft Entra ID
  • Access to the Microsoft Entra admin center (entra.microsoft.com)
  • Local administrator credentials on the Windows device (for re-registration steps)
  • PowerShell module: Microsoft Graph PowerShell SDK (optional but helpful)

Step-by-Step

  1. Identify duplicate device entries. Sign in to the Microsoft Entra admin center with an account that has the Global Administrator or Intune Administrator role. Navigate to Identity > Devices > All devices. Look for devices with the same hostname. You can sort by the “Device name” column to group duplicates. Note the Device ID and the Join Type (should be “Hybrid Azure AD joined”) for each duplicate.
  2. Verify which entry is the current, valid one. Check the “Last sign-in” column. The entry with the most recent sign-in is likely the active one. Also look at the “Registered” date—the older entry is usually stale. If you’re unsure, you can check the device’s registration details on the machine itself: open Command Prompt and run dsregcmd /status. The output shows the DeviceId that the machine currently uses; that ID should match the entry you keep.
  3. Remove the stale duplicate(s). Select the duplicate device entry that is not current, then click Delete. Confirm the deletion when prompted. If you have many duplicates, you can use PowerShell with the Microsoft Graph module to bulk delete. For example, to delete a device by its Device ID, run: Remove-MgDevice -DeviceId "device-id-here". Be careful to only delete the stale entries.
  4. Check for lingering on-premises records. Duplicates often originate from the on-premises Active Directory. Open Active Directory Users and Computers on a domain controller or admin workstation. Look in the Computers container and any organizational units where devices reside. Find the computer account that matches the duplicate. If there are multiple computer accounts with the same name, the stale one may need to be disabled or deleted. However, do not delete the computer account that the device currently uses for domain authentication—that would break the machine’s domain membership.
  5. Force a re-sync of the device registration (if needed). If the duplicate keeps reappearing, the device may have multiple registration records. On the affected Windows device, open an elevated Command Prompt and run dsregcmd /leave. This removes the device from Entra ID. Then run dsregcmd /join to re-register. Restart the device. This should create a single, fresh entry.
  6. Wait for the next sync cycle. Hybrid join entries are synchronized from on-premises AD via Microsoft Entra Connect. After cleaning up, allow up to 30 minutes for the next sync cycle to run. You can also force a sync from the server running Microsoft Entra Connect: open PowerShell as an administrator and run Start-ADSyncSyncCycle -PolicyType Delta.
  7. Verify the cleanup. Return to the All devices page in the Entra admin center. Refresh the list and confirm that each device name appears only once, with the correct join type and a recent last sign-in.

Common Mistakes

  • Deleting the wrong device. Always check the last sign-in and the Device ID from dsregcmd /status before deleting. Deleting the active entry will cause the device to lose its hybrid join status and may trigger a re-registration.
  • Ignoring on-premises computer accounts. If you only delete the Entra ID entry but leave a stale computer account in AD, the next sync may recreate the duplicate.
  • Deleting the on-premises computer account that is still in use. This will break the device’s domain membership. Only delete or disable accounts that are clearly stale (e.g., last logon is months old).
  • Not checking for multiple sync connectors. If you have multiple Microsoft Entra Connect servers or staging servers, they might be syncing the same device from different OUs, causing duplicates. Ensure only one server is the active sync engine.

Tips

  • Use the device filter. In the All devices list, use the filter to show only “Hybrid Azure AD joined” devices to reduce noise.
  • Automate cleanup. If you have many duplicates, write a PowerShell script that queries Entra ID for devices with the same name, compares last sign-in times, and deletes all but the most recent. Test on a small set first.
  • Enable device writeback (if applicable). If you use device writeback for Windows Hello for Business or other features, ensure it’s configured correctly, as misconfigurations can cause duplicate entries.
  • Monitor sync health. Regularly review Microsoft Entra Connect health to catch sync errors that might create duplicates.

Troubleshooting

  • Duplicate reappears after deletion. This usually means the on-premises computer account still exists and is being synced. Check AD and delete or disable the stale computer account. Also verify that the device is not registered via a different method (e.g., Azure AD registered) in addition to hybrid join.
  • Cannot delete a device entry. You might lack permissions. Ensure you have the Global Administrator or Intune Administrator role. If the device is enrolled in Intune, you may need to delete it from Intune first (in the Intune admin center under Devices > All devices).
  • Device shows as “Pending” after re-registration. This is normal for a short time. Wait for the next sync cycle. If it persists, check the device’s dsregcmd /status output for errors and verify that the device can reach the internet and the on-premises federation server (if applicable).
  • Multiple devices with same name but different IDs. This can happen if the device was re-imaged or if the computer account was recreated. Use the last sign-in to determine the active one, and delete the stale ones.
  • Sync errors in Microsoft Entra Connect. Check the Microsoft Entra Connect sync service manager for errors related to device objects. Common errors include attribute mismatches or duplicate source anchors. Fix the underlying AD issue and re-run a delta sync.

Frequently Asked Questions

Why do duplicate device entries occur in hybrid join?

Duplicates typically arise when a device is re-registered without properly removing the old registration, when the on-premises computer account is recreated, or when multiple sync engines (like a staging server) are in use.

Can I delete a device entry from Entra ID without affecting the on-premises device?

Yes, deleting the Entra ID entry only removes the cloud record. The on-premises computer account remains. However, the device may re-register on the next sync if the on-premises account is still valid. To prevent that, you must also remove the stale on-premises computer account.

What is the difference between a hybrid join and an Azure AD registered device?

Hybrid join means the device is domain-joined and also registered in Entra ID. Azure AD registered devices are personal or corporate devices that are not domain-joined but have an Entra ID account. Duplicates usually involve hybrid join entries.

How long does it take for a device deletion to propagate?

Deletion from the Entra admin center is immediate. However, if the device is re-synced from on-premises, it may reappear within the next sync cycle, which can be up to 30 minutes.

Do I need to rejoin the device to the domain after deleting the duplicate?

No, deleting the stale Entra ID entry does not affect the device’s domain membership. Only the cloud registration is removed. You only need to re-run dsregcmd /join if you want to force a fresh registration.

Can I use PowerShell to list all duplicate devices?

Yes, you can use the Microsoft Graph PowerShell SDK to query all devices, group them by display name, and filter those with count > 1. This is helpful for large environments.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →