The short answer to getting only groups that have changed since the last check is that this is impossible (easy).
Each object in AD has an update sequence number attribute associated with it. When a group changes its USN changes. But not always. If you add / remove members to a group, USN will not change. It changes only when the group name or other simple properties change. In addition, the USN is unique on one domain controller. Therefore, you must be sure to always connect to the same server.
You can subscribe to changes in AD objects and receive notifications when they change, but it does not scale.
In my project, every time I paid attention to all the groups. This is not as bad as it seems that the API is really good at paginating a result set and it is not very intensive when searching for resources.
source share