Hi Lawrence,
I'd recommend using a slightly different approach, there's no need to check AD groups constantly:
- In Kentico create some Roles to mirror relevant groups from your AD
- Upon login check AD groups and assign relevant Kentico Roles, or remove those which are no longer assigned
- Then, if AD groups change, just ask the user to re-login and this will be picked up automatically
- Within the code use Kentico Roles to check if a user has access to a certain feature/page on the website, which is a standard out of the box behaviour