objectGUID by far. The user's objectGUID is a normal Windows GUID structure
(stored in binary) that is rename safe, so it makes a good durable foreign
key. You can create a column of type uniqueidentifier in SQL to store it
and use that for your join.
Joe K.
> That was very helpful :)
>
[quoted text clipped - 11 lines]
>>
>> > Do you have some links about doing this with c#?
@rturo - 25 Jan 2006 16:17 GMT
Now I have the problem of reading the binary content of objectGUID to store
it in SQL Database and how o convert it again to binary to search into AD.
Where is the best place to get that help?
Thank you
> objectGUID by far. The user's objectGUID is a normal Windows GUID structure
> (stored in binary) that is rename safe, so it makes a good durable foreign
[quoted text clipped - 18 lines]
> >>
> >> > Do you have some links about doing this with c#?
Joe Kaplan (MVP - ADSI) - 25 Jan 2006 17:50 GMT
The Guid structure in .NET does all of the heavy lifting for you.
When you read the objectGUID from AD has byte array, pass that to the
contructor of Guid that takes a byte array.
When working with SqlParameters, make sure you use the Guid type there.
When reading from SQL, you'll get a Guid structure back. You can then call
ToByteArray to get the binary back.
Joe K.
> Now I have the problem of reading the binary content of objectGUID to
> store
[quoted text clipped - 30 lines]
>> >>
>> >> > Do you have some links about doing this with c#?
@rturo - 25 Jan 2006 17:25 GMT
I found some help on converting the objectGUID Attribute of an AD Object to a
GUID through the GUID Structure in .NET Framework but when i try to search
for the same object with that GUID, I can't find the object.
Please help me
Thanks
> objectGUID by far. The user's objectGUID is a normal Windows GUID structure
> (stored in binary) that is rename safe, so it makes a good durable foreign
[quoted text clipped - 18 lines]
> >>
> >> > Do you have some links about doing this with c#?
Joe Kaplan (MVP - ADSI) - 25 Jan 2006 18:20 GMT
Filters for binary data in LDAP look like this:
(objectGUID=\2B\C2\66\4B\E0\4E\20\40\B6\E6\3C\81\A1\BD\A3\31)
Here, each byte is converted into a hex string of two letters and gets an
added \ in front.
You can do this easily by looping over the byte array and using the
ToString("X2") format specifier on the byte to build up a string with a
StringBuilder.
Joe K.
>I found some help on converting the objectGUID Attribute of an AD Object to
>a
[quoted text clipped - 31 lines]
>> >>
>> >> > Do you have some links about doing this with c#?