Workflow Tools Control Yard

Home / Active Directory

GUID and SID converter

Paste an objectGUID or an objectSid in any form it turns up in: the GUID itself, the base64 of an LDIF export or an immutableId, the bytes that LDP or ADSI Edit shows, the escaped bytes of an LDAP filter, or a SID such as S-1-5-32-544.

How a GUID is stored

The text form of a GUID writes its first three fields as numbers. Stored, as objectGUID is, those three fields keep their bytes in little-endian order and the last eight bytes stay as written: 9e5bab01-07dc-4ba1-a88f-93342f4b0927 is kept as 01 ab 5b 9e dc 07 a1 4b a8 8f 93 34 2f 4b 09 27. Base64 of those 16 bytes is what an LDIF export shows.

Microsoft Entra Connect calls its source anchor the immutableId. It is objectGUID in a single forest with express settings, and it encodes a source anchor that is not text, such as a GUID, in base64: so the immutableId of such an account is the base64 of its objectGUID bytes. Newer versions use ms-DS-ConsistencyGuid, which they fill from objectGUID.

How a SID is stored

A stored SID, as objectSid is, is one byte for the revision (always 1), one byte for the number of sub-authorities (at most 15), six bytes for the identifier authority (5 for the NT authority), then each sub-authority as four bytes in little-endian order. The last sub-authority of an account's SID is its relative identifier, the RID; the SID before it is the domain's.

Bytes in an LDAP filter

A binary value goes into an LDAP filter as a backslash and two hexadecimal digits per byte, so (objectGUID=\01\ab\5b...) finds an object by its GUID. The LDAP filter page reads such filters.

Sources

More Active Directory tools