Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 425
Jeremy Ellis Avatar asked Oct 14 '16 15:10

Jeremy Ellis


People also ask

What is the difference between Adal and Msal?

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.

Does Azure AD support Adal?

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.

What is B2C Msal?

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).

What is azure B2C vs Azure AD?

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.


1 Answers

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.

like image 197
vibronet Avatar answered Sep 22 '22 16:09

vibronet