简体   繁体   中英

MSAL or ADAL library for use with Azure AD B2C and Xamarin

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?

It is not possible. As you say, ADAL is generally available and supported - however, it is designed to only work against Azure AD "classic" (eg - 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM