When are Groups updated?

Feb 9, 2011 at 10:24 PM

Hello! If I do logon and use WindowsIdentity.getGroups when were groups made current? Only at user logon to domain? Or when call is made?

Feb 9, 2011 at 10:37 PM

The way Windows works is that it puts the group SIDs into your security context at logon time. I believe there's a mechanism that updates things silently underneath (token contents must have some kind of expiration), but it really depends on the SSPI underneath. I would assume that the groups are made current only during a logon for all purposes.

Now, ask this question on a Microsoft windows security group... 

Feb 22, 2011 at 5:47 PM

Thank you. The Waffle home page says "Account lookup locally and in Active Directory". Does AD look-up return attributes including current group membership? If so, can you please present code snippet that shows how to do this?

Thank you!

Feb 22, 2011 at 7:26 PM

The short answer is yes. You want a code snippet in what language and in what context? Tell me the entire story you want to solve and I'll help you with the code.

Feb 23, 2011 at 1:40 PM

I am working on a Java Swing program with some collaboration features based on groups. I would like to show the current situation without user need to logout/login from Windows.

Feb 23, 2011 at 3:59 PM

Use JNA, I wrote a Advapi32Util.getCurrentUserGroups method a while ago. See this.