Table of Contents

Class OsCapabilitiesExtensions

Namespace
Microsoft.Identity.Client
Assembly
Microsoft.Identity.Client.dll

Extension methods

public static class OsCapabilitiesExtensions
Inheritance
OsCapabilitiesExtensions
Inherited Members

Methods

GetCertificate(IConfidentialClientApplication)

Returns the certificate used to create this ConfidentialClientApplication, if any.

public static X509Certificate2 GetCertificate(this IConfidentialClientApplication confidentialClientApplication)

Parameters

confidentialClientApplication IConfidentialClientApplication

Returns

X509Certificate2

IsEmbeddedWebViewAvailable(IPublicClientApplication)

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

public static bool IsEmbeddedWebViewAvailable(this IPublicClientApplication publicClientApplication)

Parameters

publicClientApplication IPublicClientApplication

Returns

bool

Remarks

Currently there are no embedded webviews on Mac and Linux. On Windows, app developers or users should install the WebView2 runtime and this property will inform if the runtime is available, see https://aka.ms/msal-net-webview2

IsSystemWebViewAvailable(IPublicClientApplication)

Returns true if MSAL can use a system browser.

public static bool IsSystemWebViewAvailable(this IPublicClientApplication publicClientApplication)

Parameters

publicClientApplication IPublicClientApplication

Returns

bool

Remarks

On Windows, Mac and Linux a system browser can always be used, except in cases where there is no UI, e.g. SSH connection. On Android, the browser must support tabs.

IsUserInteractive(IPublicClientApplication)

Returns false when the program runs in headless OS, for example when SSH-ed into a Linux machine. Browsers (webviews) and brokers cannot be used if there is no UI support. Instead, please use AcquireTokenWithDeviceCode(IEnumerable<string>, Func<DeviceCodeResult, Task>) or AcquireTokenByIntegratedWindowsAuth(IEnumerable<string>)

public static bool IsUserInteractive(this IPublicClientApplication publicClientApplication)

Parameters

publicClientApplication IPublicClientApplication

Returns

bool