Re: Active directory groups refresh question



There is a difference between querying your local token (which is what you're doing below) and querying Active Directory for the list of current groups. When a user logs in, an access token is created that has the users SID and all SIDs of the groups that the user is a member of. This token is only created during login so that's why you're seeing this behavior. To obtain the most current list of groups that a user is a member of, you would need to query Active Directory for the MemberOf list. I'm not a VB.NET guy, so sorry for not posting any code.

--
Joseph T. Corey MCSE, Security+
Systems Administrator
jcorey@xxxxxxx


"Mark Clark" <M-Clark-nospam@xxxxxxxxxxxxx> wrote in message news:MPG.22497eb8ff5fc58698969c@xxxxxxxxxxxxxxxxxxxxxxx
This is not a programming question, per se, but I am writing a program
in VB.NET 2005 that checks the current user's group membership in Active
Directory. When I either add or remove a person from a group in AD, that
group change does not show up on the local machine until I log out and
log back in. Is there a way to force the group membership of the current
user to be updated from AD so that the membership is always current? In
case it makes a difference, I am using this line to get the membership:

System.Security.Principal.WindowsIdentity.GetCurrent.Groups.Translate
(GetType(System.Security.Principal.NTAccount))

Thanks.

.



Relevant Pages

  • Re: Looking to verify users via Active Directory
    ... I'll have an Admin ... How do I search the Active directory? ... Here is a sample that what use lets you test group membership ...
    (microsoft.public.access.modulesdaovba)
  • Error when compiling an audience
    ... When compiling an audience based on an Active Directory group I get ... An error occurred while attempting to update audience membership. ... Unable to retrieve group membership from Active Directory directory ...
    (microsoft.public.sharepoint.portalserver)
  • Help and Advice
    ... membership in Active Directory. ... My menu populates with the foll parent nones ... I have the foll groups in Active Directory ... So if you are a member of gpAccounting and gpMarketing then the respective ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Using Windows Authentication in ASP.NET - Adding properties to users
    ... I'm confused as AspNetAccessProvider is for microsoft Access. ... I don't actually want to extract any information from active directory I ... just wanted to use the windows log in name and associate this with user ... However how would I use the existing user store from the membership API ...
    (microsoft.public.dotnet.framework.aspnet)