Move the federated domain onto a managed domain:
Set-MsolUserPrincipalName -UserPrincipalName edwardlt501edwar@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 edwardlt501edwar@KT2.kb.co.in-UserPrincipalName edwardlt501edwar@<managed domain>
See the new immutable ID:
Get-MsolUser -UserPrincipalName edwardlt501edwar@KT2.kb.co.in | select ImmutableId