I recently updated to the stable version of Microsoft.IdentityModel.Clients.ActiveDirectory v3. I read here that the class UserCredential no longer support the overload UserCredential(username, password), and it has been renamed to UserPasswordCredential(username, password).
The old working code that worked in versions prior to v3:
var authContext = new AuthenticationContext(Authority);
var userCredential = new UserCredential(username, password);
var token = await authContext.AcquireTokenAsync(ResourceUrl, ClientId, userCredential);
Replaced by this in v3:
var authContext = new AuthenticationContext(Authority);
var userCredential = new UserPasswordCredential(username, password); /*Error UserPasswordCredential does not exist*/
var token = await authContext.AcquireTokenAsync(ResourceUrl, ClientId, userCredential); /*Error AcquireTokenAsync does not contain the overloaded method*/
Updating to v3 removed the overload of UserCredential as expected, but the new UserPasswordCredential subclass does not exist (atleast not in the same namespace, and with no help from VS light bulb helper).
I am using the [Platform] versions of ADAL for iOS and Android, as this project is a Xamarin shared project. Is there someone that can confirm it works in these versions of the library?
IDE: Visual Studio 2015 with Xamarin