Skip to content

SSO (CloudAPAuthEnabled) not working in CefSharp even with Chrome runtime enabled #5169

@petrdrabek

Description

@petrdrabek

When embedding CefSharp we need automatic SSO with Microsoft accounts (Azure AD / MSA).
On a normal Chrome installation this works correctly when the CloudAPAuthEnabled policy is set to 1 (Enable Microsoft® cloud authentication). Users signed into Windows with a Microsoft account or AzureAD account are automatically signed into Microsoft cloud properties without showing a login dialog.

In CefSharp:

  • 3rd party cookies are allowed.
  • Chrome runtime (CefSharpSettings.RuntimeStyle = CefRuntimeStyle.Chrome;) was tested.
  • Flags like --enable-chrome-browser-cloud-management were tested.
  • Policies in Windows registry (CloudAPAuthEnabled) are applied correctly for Chrome, but CefSharp ignores them.
  • WebView2 with AllowSingleSignOnUsingOSPrimaryAccount = true option set works.

Expected behavior:
When CloudAPAuthEnabled=1 is set in Windows policies, CefSharp with Chrome runtime should inherit this behavior and sign the user in automatically, just like Chrome does.

Actual behavior:
Even with the same machine/user where Chrome auto-signs in, CefSharp still prompts the user with a Microsoft login dialog.

Steps to reproduce:

  1. Join Windows 10/11 machine to Azure AD or sign in with a Microsoft account.
  2. Enable the CloudAPAuthEnabled policy.
  3. Launch Chrome → open a Microsoft property (e.g., outlook.office.com) → user is signed in automatically.
  4. Launch CefSharp browser (WinForms/WPF, any example app) → navigate to the same property → login prompt is shown instead of automatic sign-in.

Question / Feature request:
Is there a way to enable CloudAPAuthEnabled support in CefSharp (Chrome runtime), or is this functionality intentionally not supported in CEF?
If not currently supported, can this be exposed so that embedded Chromium respects the CloudAPAuthEnabled policy or can it be somehow set? Possible workaroud?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions