Hello @DavidWang-5785 !
Welcome to Microsoft QnA!
This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters cannot be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, NOT, ge, le, in)..
As we can read from :
we cannot clear immutable Id from a federated O365 account, instead we need to do the following:
Move the federated domain onto a managed domain:
Set-MsolUserPrincipalName -UserPrincipalName ******@KT2.kb.co.in -NewUserPrincipalName edwardlt501edwar@<managed domain, usually something.onmicrosoft.com>
Set immutableid to null:
Set-MsolUser -UserPrincipalName gw17edwardlt501edwar@<managed domain> -ImmutableId "$null"
Then wait for some time and assign a new immutable id:
set-msolUser -userprincipalname gw17edwardlt501edwar@<managed domain> -immutableID f33fc1d2-73bd-4957-995f-37c83d349ef3
Move back to federated domain:
Set-MsolUserPrincipalName -NewUserPrincipalName ******@KT2.kb.co.in-UserPrincipalName edwardlt501edwar@<managed domain>
- See the new immutable ID:
Get-MsolUser -UserPrincipalName ******@KT2.kb.co.in | select ImmutableId
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards