none
How to get current user cached Active Directory information? RRS feed

  • Question

  • Is there a way to retrieve Active Directory type information from cached credentials or cached information on the local computer? Or, can this information be retrieved from the local computer? What I am trying to accomplish is a way to determine what information to display to the end user of a windows 7 tablet/desktop application based on their "branch" or "office" information listed in their information from Active Directory.

    For example, an employee is out in the filed and logs into the tablet, launches an application and the application displays data based on the employees city and state listed in active directory but i need to know if this type of information is cached on the computer anywhere or do I need a local database preloaded for the application to make the determination. Internet access may or may not be available in the field.

    Thanks,

    Sal


    "I am not discouraged, because every wrong attempt discarded is another step forward." Thomas Edison

    Wednesday, June 20, 2012 8:11 PM

Answers

All replies

  • Sal,

      I do not believe AD Property information is cached client side. The only way I know of to get this type of information is to use System.DirectoryServices or LDAP lookups to query for it.

      You could add a cookie at login to the users machine to store some information if it is not to sensitive.


    Chris Wigley MCPD

    Wednesday, June 20, 2012 10:56 PM
  • Thanks Chris.

    No, the information is not sensative. It's just the office location of that employee I need. We have office's in multiple states and our application needs to know which company office the field employee will be at then the information is pulled down from the server based on thier location rather than pulling down the whole datatbase. I'll probably just populate the local databse with all the users information for that office location when one of them logs in.

    I hope I am in the right area of the forum. I am talking about a Windows 7 Tablet/Slate application with a local database file on the device.


    "I am not discouraged, because every wrong attempt discarded is another step forward." Thomas Edison

    Thursday, June 21, 2012 2:47 PM
  • Yes, the information should be cached, but I don't think you can get it.

    Based on this class: http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry(v=vs.100).aspx 

    It just provides a method to refresh the cache. No method for retrieving.

    Have a nice day.


    Ghost,
    Call me ghost for short, Thanks
    To get the better answer, it should be a better question.

    Friday, June 22, 2012 10:57 AM