Table of Contents

Class SystemWebViewOptions

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

Options for using the default OS browser as a separate process to handle interactive auth. MSAL will be listening for the OS browser to finish authenticating, but it cannot close the browser. It can however respond with a 200 OK message or a 302 Redirect, which can be configured here. For more details see https://aka.ms/msal-net-os-browser

public class SystemWebViewOptions
Inheritance
SystemWebViewOptions
Inherited Members

Constructors

SystemWebViewOptions()

Constructor

public SystemWebViewOptions()

Properties

BrowserRedirectError

When the user finishes authenticating, but an error occurred, MSAL will redirect the browser to the given Uri

public Uri BrowserRedirectError { get; set; }

Property Value

Uri

Remarks

Takes precedence over HtmlMessageError

BrowserRedirectSuccess

When the user finishes authenticating, MSAL will redirect the browser to the given Uri

public Uri BrowserRedirectSuccess { get; set; }

Property Value

Uri

Remarks

Takes precedence over HtmlMessageSuccess

HtmlMessageError

When the user finishes authenticating, but an error occurred, MSAL will respond with a 200 OK message, which the browser will show to the user. You can use a string format e.g. "An error has occurred: {0} details: {1}"

public string HtmlMessageError { get; set; }

Property Value

string

HtmlMessageSuccess

When the user finishes authenticating, MSAL will respond with a 200 OK message, which the browser will show to the user.

public string HtmlMessageSuccess { get; set; }

Property Value

string

OpenBrowserAsync

Allows developers to implement their own logic for starting a browser and navigating to a specific Uri. MSAL will use this when opening the browser. Leave it null and the user configured browser will be used. Consider using the static helpers OpenWithEdgeBrowserAsync and OpenWithChromeEdgeBrowserAsync

public Func<Uri, Task> OpenBrowserAsync { get; set; }

Property Value

Func<Uri, Task>

iOSHidePrivacyPrompt

This hides the privacy prompt displayed on iOS Devices (ver 13.0+) when set to true. By default, it is false and displays the prompt.

public bool iOSHidePrivacyPrompt { get; set; }

Property Value

bool

Methods

OpenWithChromeEdgeBrowserAsync(Uri)

Use Microsoft Edge Chromium to navigate to the given URI. Requires the browser to be installed. On Linux, open edge if available otherwise open the default browser.

public static Task OpenWithChromeEdgeBrowserAsync(Uri uri)

Parameters

uri Uri

Returns

Task

OpenWithEdgeBrowserAsync(Uri)

Use Microsoft Edge to navigate to the given URI. On non-windows platforms it uses whatever browser is the default.

public static Task OpenWithEdgeBrowserAsync(Uri uri)

Parameters

uri Uri

Returns

Task