title: Active Directory user password expiration date .NET/OU Group Policy
body: <p>I have searched the site for information and found this:
  <a href="https://stackoverflow.com/questions/1362977/asp-net-c-active-directory-see-how-long-before-a-users-password-expires">ASP.NET C# Active Directory - See how long before a user&#39;s password expires</a></p>
  
  <p>which explains how to get the value of when the password expires as per Domain Policy.</p>
  
  <p>My question is this: what if the user has an OU Group Policy that has a different MaxPasswordAge value, overriding the one specified in Domain Group Policy? How to programatically get the OU's Group Policy Object? </p>
  
  <p><b>Edit:</b> To make this question a little bit more clear, I am adding this edit. What I am after is to being able to tell when user's password expires. As far as I understand that date value can either be governed by domains local policy or by group object policy. I have a Linq2DirectoryService Provider that translates Linq to Ldap queries. So an LDAP query to get the date expiration value would be optimal for this subj. If you answer includes what objects wrappers supported by .net are included into this equation - it would be a dead on answer!</p>