Forum Discussion

cloudster's avatar
cloudster
Copper Contributor
Aug 23, 2022

Azue AD Device Management

Good day,

 

I am new to Azure; currently moving workstations to the Cloud (Azure).

 

There are several Windows "devices" DT-23, LT-12,  that are visible on the Azure Active Directory devices that are duplicates; with a different 'owner' for the device.

 

How would I ascertain which device should be deleted from the Azure AD? There are more than twice as many devices in the Azure AD than the devices in the organization.

 

What, if any steps, do I take to prevent this?

1 Reply

  • You may identify and Remove Duplicate Devices by the following:

    1. Check Device Join Type

    Go to Azure Portal → Microsoft Entra ID → Devices and look at the Join Type:

    • Azure AD Registered: Typically personal devices or manually joined.
    • Azure AD Joined: Corporate-owned devices.
    • Hybrid Azure AD Joined: On-prem AD devices synced via Azure AD Connect.

     

    1. Compare Device Names and Owners
    • Look for devices with the same name (e.g., DT-23) but different owners or join types.
    • Use PowerShell to export device info:
    Get-AzureADDevice | Select DisplayName, DeviceId, DeviceTrustType, ApproximateLastLogonTimestamp | Export-Csv Devices.csv

     

    • Cross-reference with your actual inventory to identify stale or duplicate entries.
    1. Delete Stale or Duplicate Devices
    • In the Azure Portal, go to Devices → All Devices.
    • Filter by Last Activity Date — remove devices that haven’t been active in 30+ days.
    • You can also bulk delete via PowerShell:
    Remove-AzureADDevice -ObjectId <DeviceId>

     

    For preventing future Duplicates:

    Use Device Cleanup Rules in Intune

     

    • Go to Intune → Devices → Device Cleanup Rules
    • Set rules to automatically remove inactive devices after X days.

    Avoid Manual Re-registration

    Re-registering devices without removing the old entry first can cause duplicates. Always:

    • Remove the old device from Azure AD before rejoining.
    • Use scripts or Autopilot for consistent provisioning.

    Monitor with Reports

     

Resources