Udostępnij za pośrednictwem


PublicClientApplication.IsBrokerAvailable Method

Definition

Returns true if an authentication broker can be used. This method is only needed for mobile scenarios which support Mobile Application Management (MAM). In other cases, use WithBroker, which will fall back to use a browser if an authentication broker is unavailable.

public bool IsBrokerAvailable ();
member this.IsBrokerAvailable : unit -> bool
Public Function IsBrokerAvailable () As Boolean

Returns

Remarks

  • On Windows, the broker (WAM) can be used on Windows 10 and is always installed. See https://aka.ms/msal-net-wam
  • On Mac, Linux, and older versions of Windows a broker is not available.
  • In .NET 6 apps, target net6.0-windows10.0.17763.0 for all Windows versions and target net6.0 for Linux and Mac.
  • In .NET classic or .NET Core 3.1 apps, install Microsoft.Identity.Client.Desktop first and call WithDesktopFeatures().
  • In mobile apps, the device must be Intune joined and Authenticator or Company Portal must be installed. See https://aka.ms/msal-brokers

Applies to