Skip to content

[Feature]: BasicAuthenticationRequested event and passing the current user credentials #5235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sergiocapozzi77 opened this issue May 9, 2025 · 2 comments
Assignees
Labels
feature request feature request

Comments

@sergiocapozzi77
Copy link

Describe the feature/enhancement you need

Hi,

I'm working with an internal website that requires authentication via a token obtained through a web request using credentials (withCredentials: true). When accessing this site in Chrome or Edge, the authentication happens seamlessly without any prompts.

However, when accessing the same site through WebView2, a login prompt appears requesting credentials. I also noticed that the BasicAuthenticationRequested event is triggered.

Is there a way to configure WebView2 to automatically use the current user's credentials, similar to how it works in standard browsers?

I’ve already set AllowSingleSignOnUsingOSPrimaryAccount = true, but that doesn’t seem to make a difference.

Interestingly, on my PC the site loads without any login prompt, but on every other machine tested, the login prompt consistently appears.

The scenario/use case where you would use this feature

HAving the login prompt poppping all the time is quite annoying for the users

How important is this request to you?

----Please select----

Suggested implementation

No response

What does your app do? Is there a pending deadline for this request?

No response

@sergiocapozzi77 sergiocapozzi77 added the feature request feature request label May 9, 2025
@sivMSFT
Copy link

sivMSFT commented May 12, 2025

Hi @sergiocapozzi77, thank you reaching out to us. Please let us know, if this browser flag solves your requirement for now: Browser Flag.

@sergiocapozzi77
Copy link
Author

@sivMSFT thanks for the response, but I have added:
AdditionalBrowserArguments = "--msSingleSignOnForInPrivateWebView2 --msAllowAmbientAuthInPrivateWebView2"

But the login popup is still appearing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

3 participants