Converting an A/D ObjectGUID to a normal Guid RRS feed

  • Question

  • User-1796506859 posted

    Hi Folks,

    I need to pull out a couple of properties from Active Directory (ObjectGUid and another field)  that need to be stored in a variable of type Guid.   Its one of those things I have done several times before but cant at the moment remember what I did.

    I have the data returned in a PropertyValuleCollection and it is of type Byte[16] which is a 128 bit representation and I would like to convert it to a Guid.    I was thinking System.Text.Encoding but not sure.

    Anyone have any ideas?

    Thursday, August 15, 2013 5:37 PM


  • User1563932795 posted

    Try this:

    Guid myGuid = new Guid(Byte16Data);

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 15, 2013 7:20 PM