Reputation: 231
In our project we have a concept of trusted users for which we specify Active Directory Group as trusted group. We fetch all users of a given trusted group and use them as trusted users.
We need to sync users of the AD group periodically. When an AD group contains large number of users, it is a network/memory intensive task, so before syncing users of a group we want to know if AD group has changed.
So want to know is there any attribute in AD group that can be used to know if the AD group has changed since last time it has been synced.
Upvotes: 1
Views: 999
Reputation: 2020
whenChanged
Shows you the last modification date.
Find it like this:
DirectoryEntry de = new DirectoryEntry("LDAP://CN=Group,OU=Groups,DC=domain,DC=com");
DateTime changed = (DateTime)de.Properties["WhenChanged"][0];
Compare with DateTime or TimeSpan functions.
Upvotes: 1