In a web application custom login page validating the Active directory username and password. I know it may lower application security by having in my own custom login page. May i know how do get the access token by verifying username and password in the application custom login page. 

Looks like the following but in more detail i want...Authenticating to Azure AD using a username & password in ADAL.net:
<https://github.com/Azure-Samples/active-directory-dotnet-native-headless>

Something like this:

```
var authContext = new AuthenticationContext(Authority);
 var userCredential = new UserPasswordCredential(username, password);
 var token = authContext.AcquireToken(ResourceUrl, ClientId, userCredential);

```