none
ResolveName Method - Can I enter a wildcard that returns all Active Directory Users?

    Question

  • Here is the code snippet I use to resolve a name:

    NameResolutionCollection coll = service.ResolveName(gridfilters, folders, ResolveNameSearchLocation.ContactsThenDirectory, false);

    What would be ideal is if I could enter a character/wildcard or something that would return all the contacts within the Active Directory and the Contacts folder.

    I tried entering an empty string(i.e. " ") that resulted in an error.

    Is is possible? Is there a way?

    Thanks in advance

    Monday, July 18, 2011 2:32 PM

All replies

  • Hi,

    unfortunately, that's not possible.

    You'll have to search the Contacts folder using EWS and FindItems.

    And use the DirectoryServices to search the GAL:

    http://www.infinitec.de/post/2005/02/27/How-to-get-the-Global-Address-List-programatically.aspx

    Kind regards,
    Henning
     "rbarr sandi" wrote in message news:47d9ff79-27cf-4e66-9137-ec95a10834b2@communitybridge.codeplex.com...

    Here is the code snippet I use to resolve a name:

    NameResolutionCollection coll = service.ResolveName(gridfilters, folders, ResolveNameSearchLocation.ContactsThenDirectory, false);

    What would be ideal is if I could enter a character/wildcard or something that would return all the contacts within the Active Directory and the Contacts folder.

    I tried entering an empty string(i.e. " ") that resulted in an error.

    Is is possible? Is there a way?

    Thanks in advance

    Monday, July 18, 2011 2:52 PM
  • I found that if I entered "SMTP", without the quotes, then this returns all of the contacts in the GAL. Although there is currently only about 10 address in the GAL so I don't how many would be returned if the list was large.
    Tuesday, July 19, 2011 8:54 AM
  • Nice find, could anyone confirm if this is a proper way of listing the GAL ? (Also in huge directories)
    Friday, February 24, 2012 1:47 PM