Azure AD delete stale/orphan devices

Andrea Saba 101 Reputation points
2021-10-12T19:16:28.36+00:00

Hello,

I notice that when our helpdesk delete or re-image a device, the device is not removed automatically in AAD.
As a workaround we run a script to compare the objectguid in AD with the deviceID in AAD so we can manually delete them, but I would like that Azure AD connect could do this work for me.

Can you please help in setup a custom sync rule or do you have any other ideas?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andrea Saba 101 Reputation points
    2021-10-13T18:28:37.79+00:00

    Hi @James Hamil and thanks for your reply. Yes I already read the document and this is a similar process that I am currently use.
    What I have in mind is to use ad connect: if I delete a user from AD, the next sync the user will be removed from AAD too. Why this process is not working for computer objects? Do you think that I can have an option in the ad connect server instead of using a PowerShell script?

    1 person found this answer helpful.
    0 comments No comments

  2. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2021-10-12T22:38:24.317+00:00

    Hi @AndreaSaba-6953 , have you been using this document for reference? The section I linked shows how you can remove them with PowerShell. Is this something that works for you or did you have something else in mind? Please let me know if you have any questions.

    Best,
    James

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.