In ADAL.NET 2.x, we use the below code to acquire token from Azure AD using UserCredential and it works perfectly:
UserCredential
var authContext = new Authen
Use UserPasswordCredential class instead which is a subclass of UserCredential
UserPasswordCredential