[python-ldap] AD objectGUID conversion to string

Michael Ströder michael at stroeder.com
Fri Sep 19 21:27:42 CEST 2014


Kernel Panic wrote:
> Hello everyone, when I extract the objectGUID value from an AD account I
> believe it is extracted in binary format, can anyone show me a way to
> convert that to a string similar to what you would get from Microsoft's
> csvde.exe tool?

In web2ldap I have code similar to this:

import uuid
u = uuid.UUID(bytes=ldap_entry['objectGUID'][0])

Not sure whether csvde.exe really displays objectGUID value as UUID string
representation though.

Ciao, Michael.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140919/945c9008/attachment.bin>


More information about the python-ldap mailing list