Skip to content

msal net 4.3

Peter edited this page Oct 19, 2023 · 7 revisions

See Microsoft Authentication Library for .NET for updated documentation.

MSAL.NET 4.3 released

We are excited to announce the release of MSAL.NET 4.3 which brings one feature, and fixes bugs.

Broker support on Xamarin.iOS

What are brokers?

Brokers are applications, provided by Microsoft on Android and iOS (Microsoft Authenticator on iOS and Android, Intune Company Portal on Android). They enable:

How to enable them?

If you build an application that needs to work in tenants where conditional access is enabled, or if you want your users can benefit from a better experience, you should enable brokers. This is simple. you'll need to call WithBroker() at the construction of the application. Then when the user signs-in interactively, they will be directed by Azure AD to install a broker from the store depending on the conditional access policies. When this is done, the next interactive authentication will use the broker.

For details, see https://aka.ms/msal-net-brokers for more information on platform specific settings required to enable the broker.

IPublicClientApplication application = PublicClientApplicationBuilder.Create(clientId)
  .WithDefaultRedirectUri()
  .WithBroker()
  .Build();

Broker support is only available on iOS at this time. Microsoft Authenticator is supporting the microsoft identity platform v2.0 endpoint. When brokers are deployed for Android, MSAL.NET will also support brokers on Android with the same mechanism.

How to migrate from ADAL.NET iOS Broker to MSAL.NET iOS Broker?

To assist in moving your ADAL.NET Xamarin iOS application to MSAL.NET, see this migration page for the code changes needed between ADAL.NET and MSAL.NET to target the iOS Broker.

Getting started with MSAL.NET

Acquiring tokens

Desktop/Mobile apps

Web Apps / Web APIs / daemon apps

Advanced topics

News

FAQ

Other resources

Clone this wiki locally