Getting a list of Cities ("l" attribute) RRS feed

  • Question

  • User-68853401 posted

    Hi All,

    How can I get a list of all cities ("l" attribute in Active Directory) that I have into my directory forest? I would like to populate a dropdown list with those cities in order to the make avaiable to the user select the employee from a specific city.


    Monday, May 15, 2006 8:37 AM

All replies

  • User1354132231 posted
    You would have to query every object that had a 'l' value "(l=*)" as the attribute and then add them to a Hashtable, keeping only unique instances.  It would be a potentially very slow query.  I would suggest if you were to do this to cache the value for a long period of time and avoid hitting AD for this every time.
    Tuesday, May 16, 2006 4:41 PM