Support for Contacts?

Jan 28, 2014 at 5:16 PM
I am having trouble getting the system to return Contacts instead of just Users. Is this something your framework can handle? It works great for Users and Groups. Thanks.
Developer
Mar 10, 2014 at 1:49 PM
The short answer is yes, it can return Contacts. Basically you want a class something like
[DirectoryType("contact")]
public class Contact : EntryObject {
    [DirectoryProperty("cn")]
    public string Name {get; set;}

    [DirectoryProperty("mail")]
    public string Email {get; set;}

    // ... etc.
}
You might need to be a little more specific with your query, though: the DirectoryType("X") attribute basically adds (objectClass=X) onto the AD filter, so you may find this returns more or fewer objects than you want.

Hope that helps!

Tom