Getting User account details from a userid
Hi,
I know I am asking quite a lot of questions at the moment but I am a Newbie. Sorry.
I have some Visual Basic script that can take a user id and get more information from the AD - Telephone First name, surname, etc.
I want to do this in VB.NET.
The script has the following lines:
' Use the NameTranslate object to convert the NT user name to the
' Distinguished Name required for the LDAP provider.
objTrans.Init ADS_NAME_INITTYPE_DOMAIN, strNetBIOSDomain
objTrans.Set ADS_NAME_TYPE_NT4, strNetBIOSDomain & "\" & strNTName
strUserDN = objTrans.Get(ADS_NAME_TYPE_1179)
Is there any way I can do this in VB.NET?
I am actually trying to locate the user in the AD and get back the fqdn for the user so I can then bind to the AD and read the attributes of the user...
All help is appreciated,
Thanks,
Sam.
Re: Getting User account details from a userid
hello :)
I have the same question - I have a user record and I would like to grab its FQDN, but I dont know how.
I have been trawling the AD schema (on MSDN) but have not found the appropriate field. I have also tried searching the net, but I seem to get swampped by explanations of what the FQDN is, but not on how to obtain it :(
many thinks in advance :D
*I notice that this post was made 2 years ago - so I am guessing it isnt as striaght forward as an attribute in the AD.