In hybrid environment, User account when moved from syncing OU to non-syncing OU, an Office 365 account will be deleted along with an Office 365 mailbox (Soft-delete).
It is recommended to move the user account back into Syncing OU from on premise, in order to restore the Office 365 account and a mailbox.
As long as the user account is moved back to syncing OU within 30 days, Office 365 mailbox along with the soft-deleted mailbox will be restored without taking any further actions from Office 365.
In case, after moving the user account into non-syncing OU, you restore the account from Office 365 the user account will now become a cloud only and will no be syncing from on premise.
To workaround this situation, we did the below steps:
$credential = Get-Credential
Connect-MsolService -Credential $credential
$ADUser = "username"
$O365User = "username@keyman "
$guid =(Get-ADUser $ADUser).Objectguid
$immutableID=[system.convert]::ToBase64String($guid.tobytearray())
Set-MsolUser -UserPrincipalName $O365User -ImmutableId $immutableID
Start-ADSyncSyncCycle -PolicyType Delta
Account is showing Sync Status cloud while it should be Onprem Synced
User account was deleted from onprem AD few days ago , and today we restored the user in AD and restored the mailbox from O365 admin console , yet the user is still showing sync status as cloud not as Synced
I deleted the user few days back and recreated from deleted items however
i found a way to do hard match is run the below command on your Sync Server.
$credential = Get-Credential
Connect-MsolService -Credential $credential
$ADUser = "username"
$O365User = "username@keyman "
$guid =(Get-ADUser $ADUser).Objectguid
$immutableID=[system.convert]::ToBase64String($guid.tobytearray())
Set-MsolUser -UserPrincipalName $O365User -ImmutableId $immutableID
Start-ADSyncSyncCycle -PolicyType Delta
I see the immutableID is the same for AD user object and O365 object? please help
-
Sree 1,971 Reputation points
2021-11-02T06:17:56.673+00:00