I Need To Make A Change With My IT Support! Call (225) 706-8414

Converting Office 365 ImmutableIDs to ActiveDirectory GUIDs

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).


  1. Open PowerShell
  2. 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 ‘someone@test.com’).ImmutableID
  3. Convert that string from a base64-encoded string to a byte array
    $byteArray = [System.Convert]::FromBase64String($iid)
  4. Convert the byte array to a GUID
    $guid = New-Object Guid(,$byteArray)

The variable $guid now contains the user’s AD ObjectGuid.

Concerned About Cyber Attacks?


Want to Migrate to the Cloud?

Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!