As of October 2016, is it still the case that the Microsoft Authentication Library (MSAL - NuGet package: Microsoft.Identity.Client) is the correct/only library to use with Xamarin (iOS/Android) and the Azure AD B2C service? This library (MSAL) is only available as an alpha and does not appear to be in a state of being actively maintained or developed (since April).
There are indications that the Active Directory Authentication Library (ADAL - NuGet package: Microsoft.IdentityModel.Clients.ActiveDirectory) is intended as Microsoft's "one-Azure-authentication-library-to-rule-them-all", and it supports Xamarin; it is also being actively maintained and is not in "alpha" or "beta" status.
Understanding that Microsoft has in the past pointed Azure AD B2C developers towards using the MSAL library, is it possible to authenticate Azure AD B2C users in a Xamarin app using the ADAL library instead? Are there blogs or sample code that someone could point me to, that would demonstrate how to do this?
ADAL.NET used AuthenticationContext as the representation of your connection to the Security Token Service (STS) or authorization server, through an Authority. MSAL.NET is designed around client applications.
Active Directory Authentication Library (ADAL) integrates with the Azure AD for developers (v1. 0) endpoint, where MSAL integrates with the Microsoft identity platform. The v1. 0 endpoint supports work accounts, but not personal accounts.
The Microsoft Authentication Library for JavaScript (MSAL. js) enables JavaScript developers to authenticate users with social and local identities using Azure Active Directory B2C (Azure AD B2C).
Azure AD B2C is a separate service from Azure Active Directory (Azure AD). It is built on the same technology as Azure AD but for a different purpose. It allows businesses to build customer facing applications, and then allow anyone to sign up into those applications with no restrictions on user account.
It is not possible. As you say, ADAL is generally available and supported - however, it is designed to only work against Azure AD "classic" (e.g. - NOT B2C) and ADFS "3.0" onward. There are important protocol and feature differences that make the ADAL OM and protocol capabilities incompatible with B2C. MSAL represents the new generation of Microsoft's authentication libraries, designed to work with Azure AD v2 endpoints, Microsoft Accounts (MSA) and Azure AD B2C. It is still in preview, but it is under active development - if you observe its repo at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/, you'll see various branches being worked on. If you want to experiment with B2C and Xamarin, that's the library to use. At this time we cannot share an ETA for when it will be generally available. thanks V.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With