Skip to main content
IT BIBLESign in

Forum / Off-Topic & Miscellaneous / Scripting & Programming

Hard Link AD Sync User

WizardTux Cool Guy OP
Oct 21, 2022, 1:18 AM UTC
#1

The process of hard linking AD objects to AAD objects for when you get errors during an AD Sync.

On the domain controller run:

Get-ADUser username | Select-Object UserPrincipalName, objectGUID, @{Name = 'ImmutableID'; Expression = { [system.convert]::ToBase64String(([GUID]$_.objectGUID).ToByteArray()) } }

Transfer the Immutable ID from AD over to the code below and run this against the user in AAD.

Connect-MsolService
Set-MsolUser -UserPrincipalName [email protected] -ImmutableId ID_FROM_AD_HERE

Sign in to reply.