Share via

Cannot delete onPremisesImmutableId

Priscillano Ramon Mariano III 90 Reputation points
2025-04-09T21:46:13.29+00:00

I'm attempting to delete the on-premises attributes of objects that I've migrated from on-premises AD to Cloud.

I'm using the cmdlets for ADSyncTools found here: https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-clear-on-premises-attributes.

The cmdlet itself is as below:
Clear-ADSyncToolsOnPremisesAttribute -Identity '*****@domain.com' -onPremisesImmutableId*

It is returning the error as shown in the image attached. This is the same error I get if I use Graph.
I am running ADSyncTools through PowerShell 7 and I am assuming this is targeting the cloud object, not the on-premises object.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Givary-MSFT 35,786 Reputation points Microsoft Employee Moderator
    2025-04-11T07:52:49.65+00:00

    @Priscillano Ramon Mariano III Thank you for your feedback, we did a quick repro on the above ask, we turned off the directory synchronization by the following the steps defined here

    Note: Disabling Directory synchronization, deactivation may require up to 72 hours.

    Once the sync is disabled, steps mentioned in this doc - https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-clear-on-premises-attributes will help to clear the on-premises attributes.

    We tested this approach in our lab environment, and it worked as expected. If the issue still persists on your end, please feel free to share the requested details (as mentioned by my colleague in the private message), so we can connect offline and assist you further.

    Was this answer helpful?


Your answer

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