Thanks all for the help so far - I'm closer to where I want to be, but not completely there.

FYI what I'm actually trying to do is this.

From a known AD username (not logged) I want to query the AD for the DN, the 'objectSID' and (wait for it!) the 'sIDHistory'.

With the help of the GetRID()/GetSID() functions I can pull back the 'objectSID' in a text format, but because this uses ADsSID to convert, I strongly suspect I will not be able to use the same function to get the 'sIDHistory'.

Is there any function within KiX to convert the binary strings of 'objectSID' and 'sIDHistory' to a text format? Or is this where I will fall down.

I actually had a 'friendly bet' with a college that 'anything he could do in VB I could do just as easily in KiX' - so I hope there is a way so I can prove him wrong!