interface ICoreWebView2ExperimentalEnvironmentOptions

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalEnvironmentOptions
  : public IUnknown

Experimental options used to create WebView2 Environment.

Summary

Members Descriptions
get_IsSingleSignOnUsingOSPrimaryAccountEnabled The IsSingleSignOnUsingOSPrimaryAccountEnabled property is used to enable single sign on with Azure Active Directory (AAD) resources inside WebView using the logged in Windows account and single sign on with web sites using Microsoft account associated with the login in Windows account.
put_IsSingleSignOnUsingOSPrimaryAccountEnabled Set the IsSingleSignOnUsingOSPrimaryAccountEnabled property.

A default implementation is provided in WebView2ExperimentalEnvironmentOptions.h.

    auto options = Microsoft::WRL::Make<CoreWebView2ExperimentalEnvironmentOptions>();
    CHECK_FAILURE(options->put_IsSingleSignOnUsingOSPrimaryAccountEnabled(
        m_AADSSOEnabled ? TRUE : FALSE));
    if (!m_language.empty())
        CHECK_FAILURE(options->put_Language(m_language.c_str()));
    HRESULT hr = CreateCoreWebView2EnvironmentWithOptions(
        subFolder, nullptr, options.Get(),
        Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(
            this, &AppWindow::OnCreateEnvironmentCompleted)
            .Get());

Members

get_IsSingleSignOnUsingOSPrimaryAccountEnabled

The IsSingleSignOnUsingOSPrimaryAccountEnabled property is used to enable single sign on with Azure Active Directory (AAD) resources inside WebView using the logged in Windows account and single sign on with web sites using Microsoft account associated with the login in Windows account.

public HRESULT get_IsSingleSignOnUsingOSPrimaryAccountEnabled(BOOL * enabled)

Default is disabled. Universal Windows Platform apps must also declare enterpriseCloudSSO restricted capability for the single sign on to work.

put_IsSingleSignOnUsingOSPrimaryAccountEnabled

Set the IsSingleSignOnUsingOSPrimaryAccountEnabled property.

public HRESULT put_IsSingleSignOnUsingOSPrimaryAccountEnabled(BOOL enabled)