1

What I need to do is realize query of GAL from webpage. I tried standard way (Querying LDAP with DirectoryServices), but it doesn't help me very much because of huge amount of records in GAL (approx. 150 000). What I need is to get user info for the following query:

(&(objectCategory=person)(objectClass=user)(|(SAMAccountName=*{0}*)(displayname=*{0}*)(userprincipalname=*{0}*))),

where {0} stands for data I've got from user.

Outlook does such things very fast. I guess it stores data somewhere, and somehow syncs it with GAL.

What I am trying to do is to maintain synchronized copy of GAL (only 3 fields I need), but I don't know how to generate a query for "new" items, for example users added in the last week.

Is there a way to get such information?

yhaskell
  • 13
  • 1
  • 5
  • Do you need the wildcard stars? – John Nov 12 '12 at 11:31
  • yes, without them I have acceptable time (like 10-15 seconds) to get answers. – yhaskell Nov 13 '12 at 10:17
  • So the wildcards are slowing it down, may i suggest and exact match then re-run with wildcard if no matches found? Outlook syncs the address book daily, maybe you could cache it in a dataset then using dataset filtering? – John Nov 13 '12 at 14:44
  • like I said, I just will get all info from ldap to sql every day, but I need to get only new (or changed) items from LDAP so I would not reupload 150000 items every day. – yhaskell Nov 15 '12 at 03:34

1 Answers1

0

I would recommend figuring out how to make the LDAP queries responsive because I highly doubt that Outlook caches this data. You might want to look at Ambiguous Name Resolution as a starting place.

That being said, you want to add a parameter to your search for either the whenChanged attribute or the whenCreated attribute. You can take a look at this article to find out how to search from one of these attributes.

Sean Hall
  • 7,629
  • 2
  • 29
  • 44