You are troubleshooting a DirSync install and need to covert the ImmutableID for an Office365 user back to an AD-style GUID (i.e. the reverse of manually linking AD and O365 accounts).
- Open PowerShell
- Copy the ImmutableID for the user to a variable:
$iid = “some-string”Note, this will probably be from a call to the Get-MSOLUser cmdlet:
$iid = (Get-MSOLUser -UserPrincipalName ‘email@example.com’).ImmutableID
- Convert that string from a base64-encoded string to a byte array
$byteArray = [System.Convert]::FromBase64String($iid)
- Convert the byte array to a GUID
$guid = New-Object Guid(,$byteArray)
The variable $guid now contains the user’s AD ObjectGuid.