I am developing a Windows Store app for business. The client application connects to the server and can only enter the server if it has the correct credentials and belongs to the correct domain.
But when a connection is not available to connect the client to the server, the user must use the cached user credentials provided by Active Directory so that the user can work offline. The problem is that Windows Store apps use Azure Active Directory, so I have to be connected to the Internet.
I would like to be able to search for a user and verify credentials in almost the following way using DirectoryEntry and DirectorySearcher , which are in the System.DirectoryServices namespace of a regular Windows Desktop application:
DirectoryEntry directoryEntry = new DirectoryEntry("LDAP://" + domain, username, password, AuthenticationTypes.Secure); DirectorySearcher directorySearcher = new DirectorySearcher(directoryEntry); directorySearcher.FindOne();
source share