I have been looking for a way to convert the ObjectGuid out of Active Directory is a special type that gets converted to a string, which is odd looking, using libraries such as ldapjs and or adding it as a claim using ping federate. An example of this is the following:
const ldapjs = require("ldapjs");
let _client = ldapjs.createClient({
"url": this._ldap_uri
});
_client.search(this._search_dn, opts, (error, res) => {
res.on("searchEntry", (entry) => {
console.log(entry.object.objectGUID)
}
Here is an example of the output that comes out of ldapjs. The same comes out of a ping federate when you add it as a claim.
H�Y��fB�_-_���
However, this is equivalent to a valid UUID.
b9****48-6***-42**-a**f-2d5f*****40b
What I am trying to do is convert this strange value to a the correct UUID. I have scoured and tested a few different postings and websites but I have not found a valid solution.
Here are a few I researched:
If anyone has a solution to this it would be appreciated.