<PackageReference Include="Microsoft.Identity.Client" Version="4.85.2" />

Microsoft.Identity.Client.PublicClientApplication

public static IAccount OperatingSystemAccount { get; }

A special account value that indicates that the current operating system account should be used to log the user in. Not all operating systems and authentication flows support this concept, in which case calling AcquireTokenSilent will throw an MsalUiRequiredException.

public bool IsSystemWebViewAvailable { get; }

public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePassword(IEnumerable<string> scopes, string username, string password)

public bool IsBrokerAvailable()

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.

Returns true if MSAL can use an embedded web view (web browser).

Used to determine if the currently available broker is able to perform Proof-of-Possession.

public bool IsUserInteractive()

Returns false when the application runs in headless mode (e.g., when SSH-d into a Linux machine). Browsers (web views) and brokers cannot be used if there is no UI support. For those scenarios, use AcquireTokenWithDeviceCode.