stevenha

Exchange and Office365 Adventures from the world of Microsoft Premier Field Engineering

Script to convert an MS Online Directory Immutable ID to an AD GUID (and Vice Versa)

Script to convert an MS Online Directory Immutable ID to an AD GUID (and Vice Versa)

  • Comments 1
  • Likes

This script can take an ImmutableID found in the DirSync Metaverse or via get-msoluser and output the GUID of the corresponding object from the SOURCE AD.

It can also take the Source AD GUID and tell you what the ImmutableID should be.

   

Useful in troubleshooting DirSync issues and determining which AD Object maps to which MSOD object.

Examples:
To convert a GUID to an Immutable ID: GUID2ImmutableID.ps1 '748b2d72-706b-42f8-8b25-82fd8733860f'
To convert an ImmutableID to a GUID: GUID2ImmutableID.ps1 'ci2LdGtw+EKLJYL9hzOGDw=='

It can be found at: http://gallery.technet.microsoft.com/office/Covert-DirSyncMS-Online-5f3563b1

Comments
  • The following (one way) powershell example script queries all AD users, and converts their ObjectGUIDs to ImmitableIDs.

    Get-ADUser -Filter * -Properties ObjectGUID | select ObjectGUID | foreach `
    {[system.convert]::ToBase64String(([GUID]($_.ObjectGUID)).tobytearray())}

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment