PublicClientApplication.IsBrokerAvailable Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 targetnet6.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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈