Pulling User name and info From Active Directory using LDAP in VB.net 2005

Hello,

I am sorry I do not have functional code to post but I hope you can understand my request enought to give me a hand.

NEEDS:

1> take a request... ie. First name, Last name, or login ID and Search AD Path can be hard coded so entire forest is not searched.

2> List all entries found

3>once the correct user is selected I need to pull First, last, middle name and , Email , Phone number , @ and GUID for that user.

Thank you very very much in advance.

Marcelo



Answer this question

Pulling User name and info From Active Directory using LDAP in VB.net 2005

  • Massimo Mascaro

    I have the reference and the imports in my program, but I still get the same error. Any ideas
  • smitchzilla

    Here is some code to enumerate an Active Directory entry and all of its available properties/values. Adjust the filter to suit your needs. Hope this helps!
  • Michael Morrissey

    Can somebody help me debug the code above When I paste it into my program I get a blue squiggly line under prop.Value It says Expression is of type 'Object', which is not a collection type. I'm not sure how to fix it. Thanks...
  • sambhav

    Try putting Option Strict Off at the top of your code


  • ATS16805

    Ray,

    Thanks for the code I allowed me to poll LDAP with the account name. Do you know if I poll the users GUID so I can record that instead of there name. I have had serveral users that have had name changes and the records are no longer valid.

    Thanks for the code it worked great


  • Erik BN

    It compiles and runs fine for me, with the exception of the extra curly brace in the console.writeline command. Make sure you're referencing the System.DirectoryServices assembly, and have an Imports System.DirectoryServices line at the top of your file.
  • Pulling User name and info From Active Directory using LDAP in VB.net 2005