merge User from Active Directory with EntraID

First, M365-enable the user (set mailNickname, msExchAddressBookFlags etc; with our Script «M365-enable-Users.ps1»

Then, get the ImmutableId from AD User (run on a DC):

$user = Get-ADUser -Filter 'Name -like "thomas schmid"'
$immutableid = [System.Convert]::ToBase64String($user.ObjectGUID.tobytearray())
$immutableid

Now, set the ImmutableId from the AD User to the EntraID User (run in Powershell):

Install-Module AzureAD
Import-Module AzureAD
Connect-AzureAD
Get-AzureADUser > copy ObjectId of User
Get-AzureADUser -ObjectId [ObjectId] | Select UserPrincipalName,ImmutableId
Set-AzureADUser -ObjectId [ObjectId] -ImmutableId [ImmutableId from AD User]

Finally, start EntraID Sync. The Cloud-User should be merged with the AD-one.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.